diff --git a/coconut/command/util.py b/coconut/command/util.py
index <HASH>..<HASH> 100644
--- a/coconut/command/util.py
+++ b/coconut/command/util.py
@@ -239,7 +239,9 @@ def run_cmd(cmd, show_output=True, raise_errs=True, **kwargs):
     elif show_output:
         return subprocess.call(cmd, **kwargs)
     else:
-        stdout, stderr, _ = call_output(cmd, **kwargs)
+        stdout, stderr, retcode = call_output(cmd, **kwargs)
+        if retcode and raise_errs:
+            raise subprocess.CalledProcessError(retcode, cmd, stdout, stderr)
         return "".join(stdout + stderr)
 
 
diff --git a/tests/main_test.py b/tests/main_test.py
index <HASH>..<HASH> 100644
--- a/tests/main_test.py
+++ b/tests/main_test.py
@@ -315,6 +315,7 @@ class TestShell(unittest.TestCase):
 
         def test_jupyter(self):
             call(["coconut", "--jupyter"], assert_output="Coconut: Successfully installed Coconut Jupyter kernel.")
+            call(["jupyter", "kernelspec", "list"], assert_output="coconut")
 
 
 class TestCompilation(unittest.TestCase):
Fix jupyter installation error

Resolves #<I>.