Installer PATH output #735
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The installer outputs a prompt suggesting a path add:
https://git.coopcloud.tech/toolshed/abra/src/branch/main/scripts/installer/installer#L92
which (at least for bash) results in:
echo PATH=$PATH:/path/to/installed/abra/bin >> $HOME/.bashrcif a user copies and runs this, this does not lead to the desired outcome (PATH expands into .bashrc and may fail if the path contains spaces or other characters interpreted by the shell)
I think a preferred way to do this would be:
echo "echo 'PATH=\$\{PATH\}:'$p >> $HOME/.bashrc"which after output would read:
echo 'PATH=${PATH}':/path/to/abra/bin >> ~/.bashrcwhich leads to:
however, I'm not sure whether this syntax is sh-compatible and I figured it'd be good if this change would come from someone with more experience, so I though I'd make an issue.
@knoflook any thoughts as our resident installer script expert?
Thanks @namnatulco! Feel free to take a stab at a fix if you want! We can all test it 🙏
I think I figured out a cleaner fix:
5b3929d885This doesn't rely on the
${VAR}expansion, which I thought was bash-only.it outputs something like:
echo PATH="$PATH:/home/namnatulco/.local/bin" >> /home/namnatulco/.bashrcI used this to check:
I tried to make a PR, but https://git.coopcloud.tech/toolshed/abra/compare/main...namnatulco/abra:fix-735?expand=1 says there is no change, even though the above commit shows. Maybe that's just a caching bug or something? I'll try again later.
@namnatulco nice! I think it's because your commit is in the main branch of your fork and also in the branch. So it's confusing whatever logic makes the pull request diff. Try removing the commit from your main branch and opening the PR again from your branch?
originally I tried to merge the forked main into this main, but that failed -- that's what I get for not using feature branches :)