Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Use TMPDIR environment variable in install script (#35636)

Anne Schuth3bee803b518e
diff --git a/script/install.sh b/script/install.sh
index 9cd21119b7d..feb140c9843 100755
--- a/script/install.sh
+++ b/script/install.sh
@@ -9,7 +9,12 @@ main() {
platform="$(uname -s)"
arch="$(uname -m)"
channel="${ZED_CHANNEL:-stable}"
- temp="$(mktemp -d "/tmp/zed-XXXXXX")"
+ # Use TMPDIR if available (for environments with non-standard temp directories)
+ if [ -n "${TMPDIR:-}" ] && [ -d "${TMPDIR}" ]; then
+ temp="$(mktemp -d "$TMPDIR/zed-XXXXXX")"
+ else
+ temp="$(mktemp -d "/tmp/zed-XXXXXX")"
+ fi
if [ "$platform" = "Darwin" ]; then
platform="macos"