Closed mklaber closed 5 years ago
what terminal program are you using? exiting a process with code 1 should be perfectly legitimate to stop with an error, and this works OK on my MacOs terminal.
macOS's Terminal.
I am no longer able to reproduce this consistently so will close this issue.
For reference, I figured it out. I've got a script that I was running to set my local environment variables before running claudia. The script (set-env.sh
) looks like:
#!/usr/bin/env bash
set -e
export $(egrep -v '^#' .env | xargs)
I then executed it by doing . set-env.sh
The problematic line is the set -e
which was causing the Terminal to exit.
@gojko is there/can there be support for dotenv for the CLI tool?
It's entirely possible I'm being daft or have some how messed up my own node.js (v9.11.1 via nvm) installation but I've been unable to replicate the following behaviour with anything except Claudia.
tl;dr: claudia errors terminate my macOS Terminal session
When running a
claudia
command that (legitimately) fails on macOS, I expect an error to be printed to the terminal andclaudia
to exit leaving the terminal ready for another command.When running a
claudia
command that (legitimately) fails, my macOS Terminal session is terminated.No need to create a project, just follow these steps:
Output:
I tried replicating the error handling from
cmd.js
in a separate file:And
node some-test-file.js
And it did not close the Terminal.