Fix ubuntu and mac no permission error

cache folder $HOME/.dotnet is created during the install process and user
use. However .dotnet folder belongs to root for ubuntu and mac due to
sudo -H policy. Override HOME during installation.
This commit is contained in:
William Li 2017-08-02 18:09:15 -07:00 committed by William Lee
parent 164879c521
commit ffcbbbc8c4
3 changed files with 21 additions and 4 deletions

View file

@ -19,4 +19,10 @@ Installation Note
-------------- --------------
A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete." A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete."
/usr/share/dotnet/dotnet exec /usr/share/dotnet/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "debianpackage" > /dev/null 2>&1 || true 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
HOME=$INSTALL_TEMP_HOME first_run

View file

@ -6,11 +6,16 @@
PACKAGE=$1 PACKAGE=$1
INSTALL_DESTINATION=$2 INSTALL_DESTINATION=$2
INSTALL_TEMP_HOME=/tmp/dotnet-installer
# A temporary fix for the permissions issue(s) # A temporary fix for the permissions issue(s)
chmod -R 755 $INSTALL_DESTINATION chmod -R 755 $INSTALL_DESTINATION
$INSTALL_DESTINATION/dotnet exec $INSTALL_DESTINATION/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "$1" > /dev/null 2>&1 || true 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
HOME=$INSTALL_TEMP_HOME first_run
exit 0 exit 0

View file

@ -23,4 +23,10 @@ Installation Note
-------------- --------------
A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete." A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete."
/usr/share/dotnet/dotnet exec /usr/share/dotnet/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "rpmpackage" > /dev/null 2>&1 || true first_run() {
/usr/share/dotnet/dotnet exec /usr/share/dotnet/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "rpmpackage" > /dev/null 2>&1 || true
}
INSTALL_TEMP_HOME=/tmp/dotnet-installer
[ -d $INSTALL_TEMP_HOME ] || mkdir $INSTALL_TEMP_HOME
HOME=$INSTALL_TEMP_HOME first_run