summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--habitat/plan.ps15
1 files changed, 5 insertions, 0 deletions
diff --git a/habitat/plan.ps1 b/habitat/plan.ps1
index ca40a13bda..f1ec962a94 100644
--- a/habitat/plan.ps1
+++ b/habitat/plan.ps1
@@ -44,6 +44,7 @@ function Invoke-Download() {
try {
Push-Location (Resolve-Path "$PLAN_CONTEXT/../").Path
git archive --format=zip --output="${HAB_CACHE_SRC_PATH}/${pkg_filename}" HEAD
+ if (-not $?) { throw "unable to create archive of source" }
} finally {
Pop-Location
}
@@ -62,6 +63,7 @@ function Invoke-Prepare {
Write-BuildLine " ** Configuring bundler for this build environment"
bundle config --local without server docgen maintenance pry travis integration ci chefstyle
+ if (-not $?) { throw "unable to configure bundler to restrict gems to be installed" }
bundle config --local jobs 4
bundle config --local retry 5
bundle config --local silence_root_warning 1
@@ -76,14 +78,17 @@ function Invoke-Build {
Write-BuildLine " ** Using bundler to retrieve the Ruby dependencies"
bundle install
+ if (-not $?) { throw "unable to install gem dependencies" }
Write-BuildLine " ** Running the chef project's 'rake install' to install the path-based gems so they look like any other installed gem."
bundle exec rake install # this needs to be 'bundle exec'd because a Rakefile makes reference to Bundler
+ if (-not $?) { throw "unable to install the gems that live in directories within this repo" }
Write-BuildLine " ** Also 'rake install' any gem sourced as a git reference."
foreach($git_gem in (Get-ChildItem "$env:GEM_HOME/bundler/gems")) {
try {
Push-Location $git_gem
Write-BuildLine " -- and $git_gem too"
rake install # 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
}