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

bashunit tests are succeeding on OSX even in the presence of a syntax error #243

Closed
damienmg opened this issue Jun 12, 2015 · 2 comments
Closed
Labels
team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug untriaged

Comments

@damienmg
Copy link
Contributor

bashunit use traps and apparently bash under OSX use the exit code of the commands in the trap as the error code of the shell script.

A simple case illustrating that is:

$ cat scripts/release/test.sh 
#!/bin/bash -eu
trap true EXIT
A=( () )
$  ./scripts/release/test.sh; echo $?
./scripts/release/test.sh: line 5: syntax error near unexpected token `('
0

It is probably a question of setting the good environment in Bash and we should at least have a workaround in bashunit.

@damienmg damienmg added type: bug P3 We're not considering working on this, but happy to review a PR. (No assignee) labels Jun 12, 2015
@damienmg damienmg modified the milestone: 1.0 Jun 14, 2016
@davidstanke
Copy link
Contributor

@philwo Do you have a recommendation here?

@meisterT meisterT removed this from the 1.0 milestone May 12, 2020
@meisterT meisterT added team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website untriaged and removed P3 We're not considering working on this, but happy to review a PR. (No assignee) category: misc > misc labels May 14, 2020
@meisterT
Copy link
Member

I don't have a Mac, is this still the case?

@philwo philwo closed this as completed Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug untriaged
Projects
None yet
Development

No branches or pull requests

4 participants