Error in `install.sh` script for MacOS
The URL is:
https://fastn.com/install.sh
If the following folder does not exist then this installer is not working.
/usr/local/bin
Someone is saying you can just create this folder if it is missing. @harshdoesdev once you are done with you two PRs can you take a stab at this, should be a trivial fix.
Also if put a check, if you fail to create the folder, show a proper message saying /usr/local/bin not found and can not create also, please help or something.
@amitu @gargajit, this issue is now resolved.
PR: https://github.com/fastn-stack/fastn/pull/1127
@gargajit please verify and close this issue.
Thanks for the quick fix @harshdoesdev
@harshdoesdev Path is not updating.
Steps followed:
-
Deleted the existing
binwhich hadfastnfrom the path/usr/local/bin/ -
Downloaded the updated
install.shscript file and replaced the old file with the updated file infastn.com. -
Copied the installer script from
fastn.com/install:curl -fsSL https://fastn.com/install.sh | bash -
In terminal, executed the script (successfully installed)
-
Quit Terminal, opened new Terminal window, ran the command
where fastn, Output:fastn not found
Note: Tried both bash and sh. No luck.
Checked
/usr/local/bin//usr/bin//Users/ajitgarg/
@gargajit you reported "If the following folder does not exist then this installer is not working: /usr/local/bin". Did you verify that this issue is fixed, that installer works if the
/usr/local/binis missing?
@amitu The above changes work but we need to modify the terminal command to install fastn, to support both bash and zsh users.
So instead of running the following command:
curl -fsSL https://fastn.com/install.sh | bash
@Heulitig and I suggest to use the below command:
source <(curl -fsSL https://fastn.com/install.sh)
Reasoning:
Users may have a zsh or bash as their default terminal. So instead of letting users figure out what is their current terminal, this command will use the source command which is supported in both shells and it will execute the installer script in the current shell, irrespective of their default terminal.
@harshdoesdev Path is not updating.
Steps followed:
- Deleted the existing
binwhich hadfastnfrom the path/usr/local/bin/- Downloaded the updated
install.shscript file and replaced the old file with the updated file infastn.com.- Copied the installer script from
fastn.com/install:curl -fsSL https://fastn.com/install.sh | bash- In terminal, executed the script (successfully installed)
5. Quit Terminal, opened new Terminal window, ran the command `where fastn`, Output: `fastn not found`
Note: Tried both `bash` and `sh`. No luck.
Checked
/usr/local/bin//usr/bin//Users/ajitgarg/
Hello @gargajit , the fastn executable could not be found during the installation because the installer script had insufficient permissions to move the file to the "/usr/local/bin" folder. To resolve this, we need to run the script with sudo to grant it sufficient permissions. As suggested, it already does automatically detect the user's shell and updates the relevant rc file.
I faced a similar issue on Linux.
manually editted the install script and changed destination path to /home/<username>/Documents/fastn/
And it worked. Then I also had to manually add the path in my fish shell config
Fixed it and opened a PR for the same
5. Quit Terminal, opened new Terminal window, ran the command `where fastn`, Output: `fastn not found`
Note: Tried both `bash` and `sh`. No luck.