aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2024-11-17 17:05:00 +1300
committerTom Ryder <tom@sanctum.geek.nz>2024-11-17 17:05:00 +1300
commitf9696cb9c9b8719f12489a2602d735b055eff3f4 (patch)
treec436d3b1d0a48710333fff37408f3ba234cd016a
parentSet encoding explicitly from locale (diff)
downloadvixf-f9696cb9c9b8719f12489a2602d735b055eff3f4.tar.gz
vixf-f9696cb9c9b8719f12489a2602d735b055eff3f4.zip
Bail out if the editor process exits non-zero
-rw-r--r--vixf.py32
1 files changed, 1 insertions, 1 deletions
diff --git a/vixf.py3 b/vixf.py3
index 9a9e91c..9a66b29 100644
--- a/vixf.py3
+++ b/vixf.py3
@@ -56,7 +56,7 @@ with tempfile.NamedTemporaryFile(mode='w', delete_on_close=False) as tf:
editor,
tf.name,
]
- subprocess.run(command)
+ subprocess.run(command, check=True)
encoding = locale.getpreferredencoding()
with open(tf.name, mode='r', encoding=encoding) as tfr: