-
Notifications
You must be signed in to change notification settings - Fork 88
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
ci: Fix SDK test script unbound variable error #1128
Conversation
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.
Can you enlighten me? I don't know what "+x" means.
The problem with the original script is that we set
https://stackoverflow.com/questions/3601515/how-to-check-if-a-variable-is-set-in-bash |
Thanks for the explanation! Makes sense. I copied it to the PR description: those types of essential explanations belong to the PR descriptions more than they do to the comment thread. |
## Changelog for advisory-db: Branch: main Commits: [rustsec/advisory-db@ca9497a4...dd7d3d72](rustsec/advisory-db@ca9497a...dd7d3d7) * [`94bde4a3`](rustsec/advisory-db@94bde4a) Brotli CVE-2020-8927 redux ([RustSec/advisory-db#1127](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/1127)) * [`32b107c4`](rustsec/advisory-db@32b107c) Assigned RUSTSEC-2021-0131 to brotli-sys ([RustSec/advisory-db#1128](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/1128)) * [`dc5ced11`](rustsec/advisory-db@dc5ced1) CVE-2020-8927 for compu-brotli-sys ([RustSec/advisory-db#1129](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/1129)) * [`dd7d3d72`](rustsec/advisory-db@dd7d3d7) Assigned RUSTSEC-2021-0132 to compu-brotli-sys ([RustSec/advisory-db#1130](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/1130))
## Changelog for advisory-db: Branch: main Commits: [rustsec/advisory-db@ca9497a4...dd7d3d72](rustsec/advisory-db@ca9497a...dd7d3d7) * [`94bde4a3`](rustsec/advisory-db@94bde4a) Brotli CVE-2020-8927 redux ([RustSec/advisory-db#1127](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/1127)) * [`32b107c4`](rustsec/advisory-db@32b107c) Assigned RUSTSEC-2021-0131 to brotli-sys ([RustSec/advisory-db#1128](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/1128)) * [`dc5ced11`](rustsec/advisory-db@dc5ced1) CVE-2020-8927 for compu-brotli-sys ([RustSec/advisory-db#1129](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/1129)) * [`dd7d3d72`](rustsec/advisory-db@dd7d3d7) Assigned RUSTSEC-2021-0132 to compu-brotli-sys ([RustSec/advisory-db#1130](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/1130))
ci: Fix SDK test script unbound variable error
The problem with the original script is that we set set -u at the top which treats unset variables as errors.
This causes an error when evaluating "$DFX_VER" inside the if statement, because DFX_VER is unset.
${var+x} is a parameter expansion which evaluates to nothing if var is unset, and substitutes the string x otherwise.
https://stackoverflow.com/questions/3601515/how-to-check-if-a-variable-is-set-in-bash