Skip to content

Commit

Permalink
yarn-config-hook: use $TMP instead of /tmp
Browse files Browse the repository at this point in the history
$TMP should be univsal for all derivations and should
work on darwin as well, if it ever switches to another
build-dir (e.g. /nix/)

see NixOS#355053 (comment)

Signed-off-by: Florian Brandes <[email protected]>
  • Loading branch information
gador committed Nov 22, 2024
1 parent a476035 commit 5658c1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/build-support/node/fetch-yarn-deps/yarn-config-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ yarnConfigHook(){
echo "Executing yarnConfigHook"

# Use a constant HOME directory
mkdir -p /tmp/home
export HOME=/tmp/home
mkdir -p "$TMP/home"
export HOME="$TMP/home"
if [[ -n "$yarnOfflineCache" ]]; then
offlineCache="$yarnOfflineCache"
fi
Expand Down

0 comments on commit 5658c1e

Please sign in to comment.