Fix upgrade issue where symbolic link for dotnet-host rpm package gets removed. ...
authorRakesh Singh <raksingh@microsoft.com>
Thu, 30 Nov 2017 20:01:25 +0000 (12:01 -0800)
committerGitHub <noreply@github.com>
Thu, 30 Nov 2017 20:01:25 +0000 (12:01 -0800)
Commit migrated from https://github.com/dotnet/core-setup/commit/e034da2ec2bc03a319be36237276570a5842bda2

src/installer/pkg/packaging/rpm/scripts/after_remove_host.sh

index e0bb6b5..7f51ccc 100644 (file)
@@ -3,5 +3,8 @@
 # Copyright (c) .NET Foundation and contributors. All rights reserved.
 # Licensed under the MIT license. See LICENSE file in the project root for full license information.
 #
-echo "Removing dotnet host symbolic link"
-unlink /usr/bin/dotnet
+# Run the script only when newer version is not installed. Skip during package upgrade 
+if [ $1 = 0 ]; then
+   echo "Removing dotnet host symbolic link"
+   unlink /usr/bin/dotnet
+fi
\ No newline at end of file