Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 812e621

Browse filesBrowse files
authored
Set installer tmp path to env var (#2730)
1 parent d2cd387 commit 812e621
Copy full SHA for 812e621

File tree

1 file changed

+3
-2
lines changed
Filter options

1 file changed

+3
-2
lines changed

‎install.sh

Copy file name to clipboardExpand all lines: install.sh
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ PROJECT_NAME="arduino-cli"
1010
# BINDIR represents the local bin location, defaults to ./bin.
1111
EFFECTIVE_BINDIR=""
1212
DEFAULT_BINDIR="$PWD/bin"
13+
TEMPDIR="${TMPDIR:-${TEMP:-${TMP:-/tmp}}}"
1314

1415
fail() {
1516
echo "$1"
@@ -137,7 +138,7 @@ downloadFile() {
137138
esac
138139
DOWNLOAD_URL="${DOWNLOAD_URL_PREFIX}${APPLICATION_DIST}"
139140

140-
INSTALLATION_TMP_FILE="/tmp/$APPLICATION_DIST"
141+
INSTALLATION_TMP_FILE="${TEMPDIR}/$APPLICATION_DIST"
141142
echo "Downloading $DOWNLOAD_URL"
142143
httpStatusCode=$(getFile "$DOWNLOAD_URL" "$INSTALLATION_TMP_FILE")
143144
if [ "$httpStatusCode" -ne 200 ]; then
@@ -186,7 +187,7 @@ downloadFile() {
186187
}
187188

188189
installFile() {
189-
INSTALLATION_TMP_DIR="/tmp/$PROJECT_NAME"
190+
INSTALLATION_TMP_DIR="${TEMPDIR}/$PROJECT_NAME"
190191
mkdir -p "$INSTALLATION_TMP_DIR"
191192
if [ "$OS" = "Windows" ]; then
192193
unzip -d "$INSTALLATION_TMP_DIR" "$INSTALLATION_TMP_FILE"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.