Page MenuHomePhabricator

D5479.diff
No OneTemporary

D5479.diff

diff --git a/scripts/build-rust-native-library.sh b/scripts/build-rust-native-library.sh
--- a/scripts/build-rust-native-library.sh
+++ b/scripts/build-rust-native-library.sh
@@ -1,11 +1,20 @@
-#!/bin/bash
+#!/usr/bin/env bash
+
+set -euxo pipefail
+
+COMM_NIX_PATH="$HOME/.cache/comm/path"
+
+# If in nix environment, re-expose nix PATH
+if [[ -f "$COMM_NIX_PATH" ]]; then
+ # shellcheck source=/dev/null
+ source "$COMM_NIX_PATH"
+fi
-set -x
# The $PATH used by Xcode likely won't contain Cargo, fix that.
# In addition, the $PATH used by XCode has lots of Apple-specific
# developer tools that your Cargo isn't expecting to use, fix that.
# Note: This assumes a default `rustup` setup and default path.
-build_path="$HOME/.cargo/bin:/usr/local/bin:/usr/bin:/bin"
+build_path="$HOME/.cargo/bin:/usr/local/bin:/usr/bin:/bin${PATH:+:}$PATH"
# cd to Cargo project
cd "${SRCROOT}/../native_rust_library" || exit
# Add iOS targets for cross-compilation

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 3:53 PM (20 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2688318
Default Alt Text
D5479.diff (962 B)

Event Timeline