Skip to content

Commit c6c90a5

Browse files
authored
fix: remove usage of cargo install and prefer cargo build (#24)
1 parent a012ecb commit c6c90a5

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

noirup

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ main() {
5353
# Remove prior installations if they exist
5454
rm -f "$NARGO_BIN_DIR/nargo"
5555

56-
# Symlink from local repo binaries to bin dir
57-
ensure ln -s "$PWD/target/release/nargo" "$NARGO_BIN_DIR/nargo"
56+
# Move the binary into the `nargo/bin` directory
57+
ensure mv "$PWD/target/release/nargo" "$NARGO_BIN_DIR/nargo"
5858

5959
say "done"
6060
exit 0
@@ -145,9 +145,14 @@ main() {
145145
say "installing at commit ${NOIRUP_COMMIT}"
146146
ensure git checkout ${NOIRUP_COMMIT}
147147
fi
148-
# Build the repo and install it locally to the .nargo bin directory.
149-
# --root appends /bin to the directory it is given, so we pass NARGO_HOME.
150-
RUSTFLAGS="-C target-cpu=native" ensure cargo install --path ./crates/nargo --bins --locked --force --root $NARGO_HOME
148+
149+
RUSTFLAGS="-C target-cpu=native" ensure cargo build --release
150+
151+
# Remove prior installations if they exist
152+
rm -f "$NARGO_BIN_DIR/nargo"
153+
154+
# Move the binary into the `nargo/bin` directory
155+
ensure mv "$PWD/target/release/nargo" "$NARGO_BIN_DIR/nargo"
151156

152157
fi
153158

0 commit comments

Comments
 (0)