-
Notifications
You must be signed in to change notification settings - Fork 441
Add default path for 'BATS_LIB_PATH' environment variable' #628
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
Conversation
hwittenborn
commented
Aug 8, 2022
- I have reviewed the Contributor Guidelines.
- I have reviewed the Code of Conduct and agree to abide by it
Thanks for your contribution. |
@martin-schulze-vireso: Any idea when the next release will be made? I'd like to start using this in my tests but I need to deploy it via my Debian package first. |
Well, the deadline for 1.8.0 is this month. However, I want to close all issues in the milestone. |
@@ -101,6 +101,7 @@ export BATS_TMPDIR="${TMPDIR:-/tmp}" | |||
BATS_TMPDIR=${BATS_TMPDIR%/} # chop off trailing / to avoid duplication | |||
export BATS_RUN_TMPDIR= | |||
export BATS_GUARANTEED_MINIMUM_VERSION=0.0.0 | |||
export BATS_LIB_PATH=${BATS_LIB_PATH-/usr/lib/bats} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the drive-by comment, but shouldn't this be ${BATS_LIB_PATH:-/usr/lib/bats}
? (Note the colon.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only translated this from the original Code but I assumed the intention is to allow for users to specify an empty search path. This would mit ve possible with colon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but the syntax for that is ${var:-default}
, not ${var-default}
, right? (Bash docs)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, :- is alternative value for unset or empty, - only replaces unset variables. Or from your link:
Omitting the colon results in a test only for a parameter that is unset. Put another way, if the colon is included, the operator tests for both parameter’s existence and that its value is not null; if the colon is omitted, the operator tests only for existence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not know that. Thank you for the explanation!