Get the fix for this issue with installing fpm

https://github.com/jordansissel/fpm/pull/1494

# Conflicts:
#	build.psm1
This commit is contained in:
Travis Plunk
2018-07-06 11:09:37 -07:00
parent 6590bd38d9
commit cf5535c571
+11 -3
View File
@@ -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."
}