fastn icon indicating copy to clipboard operation
fastn copied to clipboard

Error in `install.sh` script for MacOS

Open gargajit opened this issue 2 years ago • 8 comments

The URL is:

https://fastn.com/install.sh

If the following folder does not exist then this installer is not working.

/usr/local/bin

gargajit avatar Jul 26 '23 09:07 gargajit

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 avatar Jul 28 '23 09:07 amitu

@amitu @gargajit, this issue is now resolved.

PR: https://github.com/fastn-stack/fastn/pull/1127

harshdoesdev avatar Jul 28 '23 16:07 harshdoesdev

@gargajit please verify and close this issue.

Thanks for the quick fix @harshdoesdev

amitu avatar Jul 28 '23 16:07 amitu

@harshdoesdev Path is not updating.

Steps followed:

  1. Deleted the existing bin which had fastn from the path /usr/local/bin/

  2. Downloaded the updated install.sh script file and replaced the old file with the updated file in fastn.com.

  3. Copied the installer script from fastn.com/install: curl -fsSL https://fastn.com/install.sh | bash

  4. In terminal, executed the script (successfully installed) Screenshot 2023-07-31 at 1 57 42 PM

  5. Quit Terminal, opened new Terminal window, ran the command where fastn, Output: fastn not found Screenshot 2023-07-31 at 2 00 18 PM

Note: Tried both bash and sh. No luck.

Checked

  • /usr/local/bin/
  • /usr/bin/
  • /Users/ajitgarg/

gargajit avatar Jul 31 '23 09:07 gargajit

@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/bin is 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.

gargajit avatar Jul 31 '23 10:07 gargajit

@harshdoesdev Path is not updating.

Steps followed:

  1. Deleted the existing bin which had fastn from the path /usr/local/bin/
  2. Downloaded the updated install.sh script file and replaced the old file with the updated file in fastn.com.
  3. Copied the installer script from fastn.com/install: curl -fsSL https://fastn.com/install.sh | bash
  4. In terminal, executed the script (successfully installed)
Screenshot 2023-07-31 at 1 57 42 PM 5. Quit Terminal, opened new Terminal window, ran the command `where fastn`, Output: `fastn not found` Screenshot 2023-07-31 at 2 00 18 PM 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.

harshdoesdev avatar Aug 01 '23 04:08 harshdoesdev

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

notnotrachit avatar Aug 06 '23 11:08 notnotrachit

Fixed it and opened a PR for the same

notnotrachit avatar Aug 06 '23 12:08 notnotrachit