use mktemp to correctly use temp files

This commit is contained in:
Noah Gilson 2022-08-11 16:41:17 -07:00
parent 9e046a5203
commit 12ce4c5732
2 changed files with 2 additions and 3 deletions

View file

@ -4,6 +4,5 @@ first_run() {
/usr/share/dotnet/dotnet exec /usr/share/dotnet/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "debianpackage" > /dev/null 2>&1 || true
}
INSTALL_TEMP_HOME=/tmp/dotnet-installer
[ -d $INSTALL_TEMP_HOME ] || mkdir $INSTALL_TEMP_HOME
INSTALL_TEMP_HOME=$(mktemp -d) # mktemp should set 700 perm automatically
HOME=$INSTALL_TEMP_HOME first_run

View file

@ -12,7 +12,7 @@ first_run() {
$INSTALL_DESTINATION/dotnet exec $INSTALL_DESTINATION/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "$1" > /dev/null 2>&1 || true
}
[ -d $INSTALL_TEMP_HOME ] || mkdir $INSTALL_TEMP_HOME
INSTALL_TEMP_HOME=$(mktemp -d) # mktemp should set 700 perm automatically
HOME=$INSTALL_TEMP_HOME first_run
exit 0