SDGGiesbrecht/Workspace

Installation script doesn't reload path

Jeehut opened this issue · 6 comments

Description

I just installed Workspace using the installation script, but then was confused because none of the commands was working. Running which workspace showed that the tool was not known. Only after restarting iTerm it worked.

Availability to Help

I would like to help fix it, and I think I know my way around.

Recommended Correction

The fact that a restart of the terminal is needed should be documented either in the README installation instructions or in the output of the installation script.

Yes. I’ll check on whether the reloading is broken or was just forgotten in the first place.

macOS I assume?

Which shell; zsh, bash or something else?

macOS Big Sur Beta 9 & zsh using iTerm2 Build 3.3.12.

Ah, yes. The copy‐and‐paste one‐liner pipes the script to bash, which does export the PATH entry, but only for itself and not all the way out to the calling shell.

I’ll see if I can find a fix, but at the very least, a note at the end of the output is in order. Something like this?:

(Note: If the terminal still cannot find the newly installed tool, try restarting the terminal.)

I’m not a shell expert, but I haven’t been able to find a way to source the script without compromising shell stability.

For now I will add a note to the end of the output.

Ultimately, I hope one day SwiftPM will provide an official method of installing tools, in which case this script will become obsolete.

The note has been added here.

Great, thank you! 🎉