mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Guard fatal bootstrap steps with Start-NativeExecution
This commit is contained in:
1 parent
bb476d4aef
commit
3687692802
1 file changed
+15
-8
+15
-8
@@ -746,12 +746,17 @@ function Start-PSBootstrap {
|
|||||||
$Deps += "openssl"
|
$Deps += "openssl"
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
brew install $Deps
|
Start-NativeExecution { brew install $Deps }
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install [fpm](https://github.com/jordansissel/fpm) and [ronn](https://github.com/rtomayko/ronn)
|
# Install [fpm](https://github.com/jordansissel/fpm) and [ronn](https://github.com/rtomayko/ronn)
|
||||||
if ($Package) {
|
if ($Package) {
|
||||||
gem install fpm ronn
|
try {
|
||||||
|
# We cannot guess if the user wants to run gem install as root
|
||||||
|
Start-NativeExecution { gem install fpm ronn }
|
||||||
|
} catch {
|
||||||
|
Write-Warning "Installation of fpm and ronn gems failed! Must resolve manually."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$obtainUrl = "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain"
|
$obtainUrl = "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain"
|
||||||
@@ -766,18 +771,20 @@ function Start-PSBootstrap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($uninstallScript) {
|
if ($uninstallScript) {
|
||||||
curl -s $obtainUrl/uninstall/$uninstallScript -o $uninstallScript
|
Start-NativeExecution {
|
||||||
chmod +x $uninstallScript
|
curl -sO $obtainUrl/uninstall/$uninstallScript
|
||||||
sudo ./$uninstallScript
|
Invoke-Expression "$sudo bash ./$uninstallScript"
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Write-Warning "This script only removes prior versions of dotnet for Ubuntu 14.04 and OS X"
|
Write-Warning "This script only removes prior versions of dotnet for Ubuntu 14.04 and OS X"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install new dotnet 1.0.0 preview packages
|
# Install new dotnet 1.0.0 preview packages
|
||||||
$installScript = "dotnet-install.sh"
|
$installScript = "dotnet-install.sh"
|
||||||
curl -s $obtainUrl/$installScript -o $installScript
|
Start-NativeExecution {
|
||||||
chmod +x $installScript
|
curl -sO $obtainUrl/$installScript
|
||||||
bash ./$installScript -c $Channel -v $Version
|
bash ./$installScript -c $Channel -v $Version
|
||||||
|
}
|
||||||
|
|
||||||
# .NET Core's crypto library needs brew's OpenSSL libraries added to its rpath
|
# .NET Core's crypto library needs brew's OpenSSL libraries added to its rpath
|
||||||
if ($IsOSX) {
|
if ($IsOSX) {
|
||||||
|
|||||||
Reference in new issue
Block a user