Skip to content

Commit

Permalink
Merge pull request #14718 from dotnet/nagilson-tempfix-7.0.1xx
Browse files Browse the repository at this point in the history
[7.0.1xx] Use mktemp to correctly use temp files
  • Loading branch information
marcpopMSFT committed Oct 12, 2022
2 parents 9bb8d11 + 12ce4c5 commit f982f38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/redist/targets/packaging/deb/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f982f38

Please sign in to comment.