File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,10 @@ do_setup_environment() {
2020 build_line " Setting GEM_PATH=$GEM_HOME "
2121 export GEM_PATH=" $GEM_HOME "
2222}
23-
23+ do_prepare () {
24+ ln -sf " $( pkg_interpreter_for core/ruby3_1 bin/ruby) " " $( pkg_interpreter_for core/coreutils bin/env) "
25+ echo " $( pkg_interpreter_for core/ruby3_1 bin/ruby) "
26+ }
2427pkg_version () {
2528 cat " $SRC_PATH /VERSION"
2629}
@@ -43,6 +46,7 @@ do_build() {
4346 bundle config --local silence_root_warning 1
4447 bundle install
4548 gem build chef-cli.gemspec
49+ gem install rspec-core
4650 ruby ./post-bundle-install.rb
4751}
4852do_install () {
@@ -53,6 +57,9 @@ do_install() {
5357 gem install chef-cli-* .gem --no-document
5458 set_runtime_env " GEM_PATH" " ${pkg_prefix} /vendor"
5559 wrap_ruby_bin
60+ rm -rf $GEM_PATH /cache/
61+ rm -rf $GEM_PATH /bundler
62+ rm -rf $GEM_PATH /doc
5663}
5764wrap_ruby_bin () {
5865 local bin=" $pkg_prefix /bin/$pkg_name "
@@ -63,7 +70,7 @@ wrap_ruby_bin() {
6370set -e
6471
6572# Set binary path that allows InSpec to use non-Hab pkg binaries
66- export PATH="/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:\$ PATH"
73+ export PATH="/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:$pkg_prefix /vendor/bin: \$ PATH"
6774
6875# Set Ruby paths defined from 'do_setup_environment()'
6976 export GEM_HOME="$pkg_prefix /vendor"
You can’t perform that action at this time.
0 commit comments