Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] The install.sh script uses /usr/local/bin/fvm as a link target which requires sudo privileges #699

Open
4 tasks done
Nidal-Bakir opened this issue Mar 22, 2024 · 7 comments · May be fixed by #700
Open
4 tasks done
Labels
bug Something isn't working

Comments

@Nidal-Bakir
Copy link

Nidal-Bakir commented Mar 22, 2024

Before creating a bug report please make check the following

  • You have read our FAQ
  • If you have used flutter. Please install correctly, run pub cache repair. Close the terminal and try again.
  • If you are on Windows. Make sure you are running the terminal as administrator or with developer permissions.
  • Run fvm doctor if possible and add the output to the issue.

Describe the bug
When using the install.sh to install the FVM as a standalone bin the script will try to create a link target in the /usr/local/bin/fvm which requires sudo privileges.

To Reproduce
Steps to reproduce the behavior:

  1. Go to terminal..
  2. Run curl -fsSL https://fvm.app/install.sh | bash
  3. See an error

permission denied: /usr/local/bin/fvm
Failed to create symlink.

Expected behavior
The FVM bin can be run from anywhere on the system after installation.

Logs
N/A

Desktop (please complete the following information):

  • OS: [linux ubuntu]
  • FVM Version [N/A]

Additional context
we have tow options to discuss:

  1. The docs should state that the user should run the script with sudo or in root user mode, then the FVM bin will be in /usr/local/bin/fvm without any errors
  2. Change the link target to $HOME/.local/bin/fvm

I have modified the install.sh script to use $HOME/.local/bin/fvm and everything worked as expected.

@Nidal-Bakir Nidal-Bakir added the bug Something isn't working label Mar 22, 2024
@leoafarias
Copy link
Owner

@Nidal-Bakir can you do a PR so I can review?

@Nidal-Bakir
Copy link
Author

Nidal-Bakir commented Mar 22, 2024

sure thing...
#700

@jamilxt
Copy link

jamilxt commented Jun 4, 2024

I am facing this issue for a long time. I hope the PR will be merged as soon as possible.

Thanks @Nidal-Bakir

@azharbinanwar
Copy link

azharbinanwar commented Jun 9, 2024

@Nidal-Bakir
Thank you raising this issue, I tried a lot but nothing was helpful except your PR.

I tried this and it started working fine.

curl -fsSL https://raw.githubusercontent.com/leoafarias/fvm/e04a1f455c4db33c4c220a5239acb76c0e132c02/scripts/install.sh | bash

👍

@Nidal-Bakir
Copy link
Author

@azharbinanwar
Tip: You do not need sudo privileges to run the script

And you should use the update script update.sh to update FVM to the latest version.

We did not make a final decision about the changes yet. You probably should wait until the PR is merged and the package owner approves the changes.

@azharbinanwar
Copy link

@azharbinanwar
Tip: You do not need sudo privileges to run the script

And you should use the update script update.sh to update FVM to the latest version.

We did not make a final decision about the changes yet. You probably should wait until the PR is merged and the package owner approves the changes.

Thank you for your quick response.
I'll try update.sh

@2XL
Copy link

2XL commented Jun 23, 2024

curl -fsSL https://raw.githubusercontent.com/leoafarias/fvm/e04a1f455c4db33c4c220a5239acb76c0e132c02/scripts/install.sh | bash

for linux make sure $HOME/.local/bin/ parent dirs exists..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
5 participants