Skip to content

Commit b3eafd1

Browse files
committed
add no-op mode for rustup script
When calling this script, it immediately starts the download process. This change is mostly useful for when we want to source this file from another script file. Signed-off-by: onur-ozkan <[email protected]>
1 parent 4e7a16c commit b3eafd1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rustup-init.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ is_zsh() {
2323
[ -n "${ZSH_VERSION-}" ]
2424
}
2525

26-
set -u
27-
2826
# If RUSTUP_UPDATE_ROOT is unset or empty, default it.
2927
RUSTUP_UPDATE_ROOT="${RUSTUP_UPDATE_ROOT:-https://static.rust-lang.org/rustup}"
3028

@@ -808,4 +806,6 @@ get_strong_ciphersuites_for() {
808806
fi
809807
}
810808

811-
main "$@" || exit 1
809+
if [ "$NO_OP" != "1" ]; then
810+
main "$@" || exit 1
811+
fi

0 commit comments

Comments
 (0)