GDK does not halt on error during bundle install

Overview

If bundle install encounters an error during a gdk update (for example a Gem::Ext::BuildError), the update does not seem to notice and continues as normal.

Sometimes this will cause a real failure later in the process (eg. when generating translations), but it looks like it is possible for the update to complete "successfully".

Installing gitlab-org/gitlab Ruby gems
------------------------------------------------------------
Fetching source index from https://rubygems.org/
Fetching ffi 1.13.1
Installing ffi 1.13.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

<- full trace snipped ->

An error occurred while installing ffi (1.13.1), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.13.1' --source 'https://rubygems.org/'`
succeeds before bundling.

In Gemfile:
  derailed_benchmarks was resolved to 1.7.0, which depends on
    get_process_mem was resolved to 0.2.5, which depends on
      ffi

------------------------------------------------------------
Installing gitlab-org/gitlab Node.js packages
------------------------------------------------------------

<- continues as normal -> 

Proposal (optional)

If bundle install fails, fail the entire operation.

Environment (optional)

  • Operating System: Windows/macOS/Linux
  • The contents of your gdk.yml
  • Ruby version: <!-- output of ruby --version -->
  • GDK version: <!-- output of git rev-parse --short HEAD -->