Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transcrypt version and help output not displayed outside git repositories #68

Closed
JensErat opened this issue Aug 28, 2019 · 1 comment · Fixed by #71
Closed

Transcrypt version and help output not displayed outside git repositories #68

JensErat opened this issue Aug 28, 2019 · 1 comment · Fixed by #71

Comments

@JensErat
Copy link

transcrypt --version and transcrypt --help should also work outside git repositories, as they're frequently used to test whether the script is installed correctly. They give no output, though.

Example terminal session:

➜  /tmp mkdir test
➜  /tmp cd testtest transcrypt --version
➜  test git init
Initialized empty Git repository in /tmp/test/.git/
➜  test git:(master) transcrypt --version
transcrypt 2.0.0

Same applies to transcrypt --help.

Expected behavior: version also displayed outside an initialized git repository.

@apeschel
Copy link

apeschel commented Nov 12, 2019

I took a quick look, and this is happening due to errexit being set at the start of the script. My personal opinion is that errexit shouldn't be used at all, and that proper error handling should be relied on instead. It looks like transcrypt has pretty good error handling throughout, so it may be fine to remove errexit entirely. Alternatively, turning on could be deferred until after run_safety_checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants