inspec/ci/verify-inspec.sh
Miah Johnson 112f12da61 Updated omnibus postinst script to symlink to appbundle created binstubs (#2732)
* Updated `postinst` script to symlink to appbundle created binstubs
rather than rubygems binstubs in embedded directory.

The rubygems binstubs do not account for GEM_HOME or GEM_PATHS existing
in the invoking shell. This creates problems on systems with multiple
ruby versions. If GEM_HOME or GEM_PATH is set the rubygems embedded
binstubs will attempt to use this external gem source which will
generally result in errors for the user.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-02-28 13:47:08 -05:00

11 lines
302 B
Bash

#!/usr/bin/env bash
set -evx
# Set GEM_HOME and GEM_PATH to verify our appbundle inspec shim is correctly
# removing them from the environment while launching from our embedded ruby.
export GEM_HOME=/SHOULD_NOT_EXIST
export GEM_PATH=/SHOULD_NOT_EXIST
export PATH=$PATH:/usr/local/bin
inspec version