diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-03-30 14:11:22 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-03-30 14:11:22 +0200 |
| commit | 6a040747492e55a12c308b107f7f0b9fd76d2cf8 (patch) | |
| tree | c8e318d2a47c536b86fbbf17236287b36f480024 | |
| parent | ca42f55539c9cc1ec7c6e1366e69acccbdb19513 (diff) | |
| download | mullvadvpn-6a040747492e55a12c308b107f7f0b9fd76d2cf8.tar.xz mullvadvpn-6a040747492e55a12c308b107f7f0b9fd76d2cf8.zip | |
Add set -u for safety
| -rwxr-xr-x | format.sh | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3,6 +3,8 @@ # Will make sure you have rustfmt at the version in $VERSION, then format all the source code. # Run with --only-format as the first argument to skip checking rustfmt version. +set -u + VERSION="0.7.1" CMD="rustfmt" INSTALL_CMD="cargo install --vers $VERSION --force $CMD" @@ -20,7 +22,7 @@ function correct_rustfmt() { return 0 } -if [[ "$1" != "--only-format" ]]; then +if [[ "${1:-""}" != "--only-format" ]]; then if ! correct_rustfmt; then echo "Installing $CMD $VERSION" $INSTALL_CMD |
