mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Get the fix for this issue with installing fpm
https://github.com/jordansissel/fpm/pull/1494 # Conflicts: # build.psm1
This commit is contained in:
+11
-3
@@ -1,3 +1,6 @@
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
# On Unix paths is separated by colon
|
||||
# On Windows paths is separated by semicolon
|
||||
$script:TestModulePathSeparator = [System.IO.Path]::PathSeparator
|
||||
@@ -1614,9 +1617,14 @@ function Start-PSBootstrap {
|
||||
# Install [fpm](https://github.com/jordansissel/fpm) and [ronn](https://github.com/rtomayko/ronn)
|
||||
if ($Package) {
|
||||
try {
|
||||
# We cannot guess if the user wants to run gem install as root
|
||||
Start-NativeExecution { gem install fpm -v 1.9.3 }
|
||||
Start-NativeExecution { gem install ronn -v 0.7.3 }
|
||||
# We cannot guess if the user wants to run gem install as root on linux and windows,
|
||||
# but macOs usually requires sudo
|
||||
$gemsudo = ''
|
||||
if($Environment.IsMacOS) {
|
||||
$gemsudo = $sudo
|
||||
}
|
||||
Start-NativeExecution ([ScriptBlock]::Create("$gemsudo gem install fpm -v 1.10.0"))
|
||||
Start-NativeExecution ([ScriptBlock]::Create("$gemsudo gem install ronn -v 0.7.3"))
|
||||
} catch {
|
||||
Write-Warning "Installation of fpm and ronn gems failed! Must resolve manually."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user