Skip to content

Commit fe14350

Browse files
committed
Guard JS rustup target setup
1 parent d06c7b6 commit fe14350

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

payjoin-ffi/javascript/scripts/generate_bindings.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ cd node_modules/uniffi-bindgen-react-native
1919
cargo add home@=0.5.11 --package uniffi-bindgen-react-native
2020
cd ../..
2121

22-
rustup target add wasm32-unknown-unknown
22+
# rustup target add is a no-op against a nix-provided toolchain
23+
# (no rustup home, targets baked into the nix derivation instead).
24+
if command -v rustup >/dev/null 2>&1 &&
25+
rustup show active-toolchain >/dev/null 2>&1; then
26+
rustup target add wasm32-unknown-unknown
27+
fi
2328

2429
npm run build
2530
npm run build:test-utils

0 commit comments

Comments
 (0)