Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1671,9 +1671,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.9.3"))
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."
}
Expand Down
7 changes: 0 additions & 7 deletions tools/releaseBuild/macOS/PowerShellPackageVsts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@ try {

if ($BootStrap.IsPresent) {
Start-PSBootstrap -Package

# The gem install is run by bootstrap without sudo and fails on macOS.
# Run the commands with sudo, to resolve the issue
Write-Verbose -Message "Installing fpm..." -Verbose
Start-NativeExecution { sudo gem install fpm -v 1.8.1 }
Write-Verbose -Message "Installing ronn..." -Verbose
Start-NativeExecution { sudo gem install ronn }
}

if ($Build.IsPresent) {
Expand Down