Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install.sh stops execution with code 1 after recent commit #97

Open
Inspirational-sausage-dog opened this issue May 16, 2023 · 2 comments · May be fixed by #98
Open

install.sh stops execution with code 1 after recent commit #97

Inspirational-sausage-dog opened this issue May 16, 2023 · 2 comments · May be fixed by #98

Comments

@Inspirational-sausage-dog
Copy link

Inspirational-sausage-dog commented May 16, 2023

Hello. I downloaded install.sh script using curl to tmp folder like in "Quick Way" portion of readme and its execution fails after recent update.

/tmp/install-software.sh; echo $?                                                                                                                                                                                                                                                                           
/                                                                                                                                                              
1

I believe it has something to do with new bash code from #88 that requires a cloned repository to work

gitDir=$(realpath `dirname $BASH_SOURCE`/..)
echo $gitDir

< .. >

if [[ ! "`which git 2> /dev/null`" == "" ]]; then
    thisGit=`git -C "${gitDir}" config --get remote.origin.url`
    thisGit=${thisGit::-4}
    GITHUB_BINARY_BASE="${thisGit}/releases/download"
    GITHUB_RAW_BASE="${thisGit/github.com/raw.githubusercontent.com}/releases/download"
fi

Since I downloaded only install.sh script as described in the "Quick way", git config --get cannot find remote.origin.url variable and returns code 1.

Because environment variable is set to stop execution of the script after first non-zero code signal, scripts execution fails completely.

Has the policy on installation changed but readme hadn't or is this unexpected behavior?

@nradchenko nradchenko linked a pull request May 17, 2023 that will close this issue
@qvalentin
Copy link

I also get the error: "dirname: missing operand", "Try 'dirname --help' for more information." when running curl -fsSL https://raw.githubusercontent.com/MatchbookLab/local-persist/master/scripts/install.sh | sudo bash. Seems like $BASH_SOURCE does not work with this.

@ajax-koloskov-k
Copy link

Hello!
There is a problem.
I also get the error: "dirname: missing operand"
Use "Quick way": curl -fsSL https://raw.githubusercontent.com/MatchbookLab/local-persist/master/scripts/install.sh | sudo bash
Who knows how to solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants