File tree 2 files changed +8
-10
lines changed 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -1671,9 +1671,14 @@ function Start-PSBootstrap {
1671
1671
# Install [fpm](https://github.com/jordansissel/fpm) and [ronn](https://github.com/rtomayko/ronn)
1672
1672
if ($Package ) {
1673
1673
try {
1674
- # We cannot guess if the user wants to run gem install as root
1675
- Start-NativeExecution { gem install fpm - v 1.9 .3 }
1676
- Start-NativeExecution { gem install ronn - v 0.7 .3 }
1674
+ # We cannot guess if the user wants to run gem install as root on linux and windows,
1675
+ # but macOs usually requires sudo
1676
+ $gemsudo = ' '
1677
+ if ($Environment.IsMacOS ) {
1678
+ $gemsudo = $sudo
1679
+ }
1680
+ Start-NativeExecution ([ScriptBlock ]::Create(" $gemsudo gem install fpm -v 1.9.3" ))
1681
+ Start-NativeExecution ([ScriptBlock ]::Create(" $gemsudo gem install ronn -v 0.7.3" ))
1677
1682
} catch {
1678
1683
Write-Warning " Installation of fpm and ronn gems failed! Must resolve manually."
1679
1684
}
Original file line number Diff line number Diff line change 61
61
62
62
if ($BootStrap.IsPresent ) {
63
63
Start-PSBootstrap - Package
64
-
65
- # The gem install is run by bootstrap without sudo and fails on macOS.
66
- # Run the commands with sudo, to resolve the issue
67
- Write-Verbose - Message " Installing fpm..." - Verbose
68
- Start-NativeExecution { sudo gem install fpm - v 1.8 .1 }
69
- Write-Verbose - Message " Installing ronn..." - Verbose
70
- Start-NativeExecution { sudo gem install ronn }
71
64
}
72
65
73
66
if ($Build.IsPresent ) {
You can’t perform that action at this time.
0 commit comments