Skip to content

Commit 867484f

Browse files
authored
fix(foundryup): install for user names with empty space (#9835)
1 parent 1baa9e6 commit 867484f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

foundryup/foundryup

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -eo pipefail
44
# NOTE: if you make modifications to this script, please increment the version number.
55
# Major / minor: incremented for each stable release of Foundry.
66
# Patch: incremented for each change between stable releases.
7-
FOUNDRYUP_INSTALLER_VERSION="1.0.0"
7+
FOUNDRYUP_INSTALLER_VERSION="1.0.1"
88

99
BASE_DIR=${XDG_CONFIG_HOME:-$HOME}
1010
FOUNDRY_DIR=${FOUNDRY_DIR:-"$BASE_DIR/.foundry"}
@@ -151,7 +151,7 @@ main() {
151151
BIN_ARCHIVE_URL="${RELEASE_URL}foundry_${FOUNDRYUP_VERSION}_${PLATFORM}_${ARCHITECTURE}.$EXT"
152152
MAN_TARBALL_URL="${RELEASE_URL}foundry_man_${FOUNDRYUP_VERSION}.tar.gz"
153153

154-
ensure mkdir -p $FOUNDRY_VERSIONS_DIR
154+
ensure mkdir -p "$FOUNDRY_VERSIONS_DIR"
155155
# Download and extract the binaries archive
156156
say "downloading forge, cast, anvil, and chisel for $FOUNDRYUP_TAG version"
157157
if [ "$PLATFORM" = "win32" ]; then
@@ -164,7 +164,7 @@ main() {
164164
ensure download "$BIN_ARCHIVE_URL" "$tmp"
165165
# Make sure it's a valid tar archive.
166166
ensure tar tf $tmp 1> /dev/null
167-
ensure mkdir -p $FOUNDRY_VERSIONS_DIR/$FOUNDRYUP_TAG
167+
ensure mkdir -p "$FOUNDRY_VERSIONS_DIR/$FOUNDRYUP_TAG"
168168
ensure tar -C "$FOUNDRY_VERSIONS_DIR/$FOUNDRYUP_TAG" -xvf $tmp
169169
rm -f "$tmp"
170170
fi
@@ -224,7 +224,7 @@ main() {
224224
# Build the repo.
225225
ensure cargo build --bins "${CARGO_BUILD_ARGS[@]}"
226226
# Create foundry custom version directory.
227-
ensure mkdir -p $FOUNDRY_VERSIONS_DIR/$FOUNDRYUP_VERSION
227+
ensure mkdir -p "$FOUNDRY_VERSIONS_DIR/$FOUNDRYUP_VERSION"
228228
for bin in "${BINS[@]}"; do
229229
for try_path in target/release/$bin target/release/$bin.exe; do
230230
if [ -f "$try_path" ]; then
@@ -324,7 +324,7 @@ use() {
324324

325325
for bin in "${BINS[@]}"; do
326326
bin_path="$FOUNDRY_BIN_DIR/$bin"
327-
cp $FOUNDRY_VERSION_DIR/$bin $bin_path
327+
cp "$FOUNDRY_VERSION_DIR/$bin" "$bin_path"
328328
# Print usage msg
329329
say "use - $(ensure "$bin_path" -V)"
330330

0 commit comments

Comments
 (0)