Skip to content

Invalid caching path with custom BUNDLE_GEMFILE #131

@artplan1

Description

@artplan1

Hello,
path to be cached is invalid if env variable BUNDLE_GEMFILE leads to subdirectory

example repo: https://github.com/ErwinM/acts_as_tenant/blob/master/.github/workflows/ci.yml

gemfiles that are used as matrix, gemfiles are located in gemfiles subdirectory. Bundler installs gems in ./gemfiles/vendor/bundle, but path to gems is hardcoded to ./vendor/bundle in cache function in ruby/setup-ruby.

example of installation in ./gemfiles/vendor/bundle - https://github.com/ErwinM/acts_as_tenant/runs/1551693162#step:4:156

As quick-fix I've set BUNDLE_PATH_RELATIVE_TO_CWD, now gems are installed in ./vendor/bundle - ErwinM/acts_as_tenant#245

But maybe it will be better to change ruby/setup-ruby not to use hardcoded path or set path_relative_to_cwd as bundler's config by default or add notice to readme

Thanks

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions