Installer PATH output #735

Open
opened 2025-12-15 16:00:45 +00:00 by namnatulco · 1 comment

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/.bashrc

if 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 >> ~/.bashrc

which leads to:

  • no expansion while writing (single quotes)
  • no errors on .rc interpretation (curly braces)

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.

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/.bashrc` if 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 >> ~/.bashrc` which leads to: - no expansion while writing (single quotes) - no errors on .rc interpretation (curly braces) 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.
Owner

@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 🙏

@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 🙏
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: toolshed/abra#735
No description provided.