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

fix: installation bug #792

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jeevithakannan2
Copy link

@jeevithakannan2 jeevithakannan2 commented Nov 6, 2024

Running the script as root will cause issue as the fvm binary resides in /root

readlink /usr/local/bin/fvm 
/root/.fvm_flutter/bin/fvm

This PR proposes the following changes

  • Check if the script is running as root.

  • Check for the correct escalation tool like sudo or doas.

  • Use escalation inside the script as symlinking to /usr requires escalated privileges

  • Resolves [BUG] Failed to create symlink. #796

Copy link

vercel bot commented Nov 6, 2024

@jeevithakannan2 is attempting to deploy a commit to the FlutterTools Team on Vercel.

A member of the Team first needs to authorize it.

@silverark
Copy link

I've just hit this issue on Ubuntu 24. When installing, it downloads and unpacks FVM, but can't create the symbolic link as it doesn't have permissions to write to /usr/local/bin/

I can confirm this script fixes the issue, by asking for permission as it installs. I came here to patch it myself but glad someone beat me to it.

@Kiruel
Copy link
Contributor

Kiruel commented Dec 12, 2024

Any news on this one, I can't install it in pipeline because of this access. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Failed to create symlink.
4 participants