Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Sandbox script is not able to install bundle due to empty $BRANCH value #337

Closed
gsmendoza opened this issue Dec 6, 2022 · 2 comments · Fixed by #329
Closed

Sandbox script is not able to install bundle due to empty $BRANCH value #337

gsmendoza opened this issue Dec 6, 2022 · 2 comments · Fixed by #329
Assignees
Labels

Comments

@gsmendoza
Copy link
Contributor

gsmendoza commented Dec 6, 2022

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 gsmendoza added the bug label Dec 6, 2022
@gsmendoza gsmendoza self-assigned this Dec 6, 2022
@gsmendoza
Copy link
Contributor Author

Copying @RyanofWoods since you fixed this issue in SolidusDevSupport 👍

@RyanofWoods
Copy link
Contributor

I have a fix for this @gsmendoza #329

@elia elia mentioned this issue Dec 12, 2022
3 tasks
@elia elia closed this as completed Dec 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants