From 59fe20854883b4ae092e15bb5953fe407612beaa Mon Sep 17 00:00:00 2001 From: Dan Church Date: Sat, 29 Jul 2023 11:47:53 -0500 Subject: [PATCH] Use TMPDIR from environment if available Makes it function like the mktemp program, others. --- npm2tgz | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm2tgz b/npm2tgz index 9df1ae0..e5e6ca8 100755 --- a/npm2tgz +++ b/npm2tgz @@ -61,7 +61,7 @@ fi NODE_PKG=$1 PRGNAM=$(echo "$NODE_PKG" | tr / _ | sed 's|^@||' | cut -d@ -f1) -PKG=/tmp/$TAG/pkg-$PRGNAM +PKG=${TMPDIR:-/tmp}/$TAG/pkg-$PRGNAM [ -e "$PKG" ] && rm -fr "$PKG" mkdir -p "$PKG"