summaryrefslogtreecommitdiff
path: root/habitat
diff options
context:
space:
mode:
authorJohn McCrae <john.mccrae@progress.com>2022-09-20 13:48:00 +0600
committerPrajakta Purohit <prajakta@chef.io>2022-09-21 06:54:07 -0700
commitd7b4d16fbe8bd4cae2cf219b4194c5a6285ce8aa (patch)
treedb64b1dbea238c569bcebd231bce635f6d1c397d /habitat
parenta40ef29edab60a2660bc9702679613cf8ac79516 (diff)
downloadchef-d7b4d16fbe8bd4cae2cf219b4194c5a6285ce8aa.tar.gz
Amending installation of the rest-client gem to bypass rakefile issue
Signed-off-by: John McCrae <john.mccrae@progress.com>
Diffstat (limited to 'habitat')
-rw-r--r--habitat/plan.ps112
1 files changed, 11 insertions, 1 deletions
diff --git a/habitat/plan.ps1 b/habitat/plan.ps1
index 4b37b27e59..83312c4345 100644
--- a/habitat/plan.ps1
+++ b/habitat/plan.ps1
@@ -96,7 +96,17 @@ function Invoke-Build {
try {
Push-Location $git_gem
Write-BuildLine " -- installing $git_gem"
- rake install $git_gem --trace=stdout # this needs to NOT be 'bundle exec'd else bundler complains about dev deps not being installed
+ # The rest client doesn't have an 'Install' task so it bombs out when we call Rake Install for it
+ # Happily, its Rakefile ultimately calls 'gem build' to build itself with. We're doing that here.
+ if ($git_gem -match "rest-client"){
+ $gemspec_path = $git_gem.ToString() + "\rest-client.windows.gemspec"
+ gem build $gemspec_path
+ $gem_path = $git_gem.ToString() + "\rest-client*.gem"
+ gem install $gem_path
+ }
+ else {
+ rake install $git_gem --trace=stdout # this needs to NOT be 'bundle exec'd else bundler complains about dev deps not being installed
+ }
if (-not $?) { throw "unable to install $($git_gem) as a plain old gem" }
} finally {
Pop-Location