Sandbox script is not able to install bundle due to empty $BRANCH value
gsmendoza opened this issue ยท 2 comments
gsmendoza commented
Solidus Version
Should be master branch, but the sandbox script is setting it to an empty string:
# Gemfile
gem 'solidus', github: 'solidusio/solidus', branch: ''
To Reproduce
Run bin/sandbox
on repo's master branch (f99f81f).
Current behavior
At the point when the sandbox script tries to install the Solidus gem, the following error is displayed:
Fetching https://github.com/solidusio/solidus.git
fatal: Needed a single revision
Git error: command `git rev-parse --verify ''` in directory
/home/gsmendoza/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/cache/bundler/git/solidus-169f1ecb1aee2122950e6d586daf2410f62df66e
has failed.
Revision does not exist in the repository
https://github.com/solidusio/solidus.git. Maybe you misspelled it?
If this error persists you could try removing the cache directory
'/home/gsmendoza/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/cache/bundler/git/solidus-169f1ecb1aee2122950e6d586daf2410f62df66e'
The git source https://github.com/solidusio/solidus.git is not yet checked out. Please run `bundle install` before trying to start your application
The git source https://github.com/solidusio/solidus.git is not yet checked out. Please run `bundle install` before trying to start your application
The git source https://github.com/solidusio/solidus.git is not yet checked out. Please run `bundle install` before trying to start your application
The git source https://github.com/solidusio/solidus.git is not yet checked out. Please run `bundle install` before trying to start your application
Furthermore, if you cd to the sandbox and run bundle install
, you get the same error:
sandbox 16:08:31 $ bundle install
Fetching https://github.com/solidusio/solidus.git
fatal: Needed a single revision
Git error: command `git rev-parse --verify ''` in directory
/home/gsmendoza/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/cache/bundler/git/solidus-169f1ecb1aee2122950e6d586daf2410f62df66e
has failed.
Revision does not exist in the repository
https://github.com/solidusio/solidus.git. Maybe you misspelled it?
If this error persists you could try removing the cache directory
'/home/gsmendoza/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/cache/bundler/git/solidus-169f1ecb1aee2122950e6d586daf2410f62df66e'
Expected behavior
bin/sandbox
should be able to install solidus.
Possible cause
The Solidus branch specified in the Gemfile is an empty string:
# sandbox/Gemfile
gem 'solidus', github: 'solidusio/solidus', branch: ''
Possible solution
By default, the solidus branch should be set to master:
# sandbox/Gemfile
gem 'solidus', github: 'solidusio/solidus', branch: 'master'
It seems that copying these two fixes from SolidusDevSupport would fix this issue:
gsmendoza commented
Copying @RyanofWoods since you fixed this issue in SolidusDevSupport ๐
RyanofWoods commented
I have a fix for this @gsmendoza #329