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(install): ignore tarfile ownership values when installing as root #4046

Merged
merged 2 commits into from Jun 5, 2022

Conversation

DrHyde
Copy link
Contributor

@DrHyde DrHyde commented Jun 5, 2022

If the install script used sudo to install Starship from a tarball, it left the file with what the userid/groupid was in the tarball. That user/group might or might not actually exist. This change fixes that.

Description

We now use the -o flag when untarring, to force tar to use the current user's userid/groupid instead of whatever is in the tarball. That is on by default for non-root users, but not for root.

Motivation and Context

Closes #4039

Screenshots (if appropriate):

How Has This Been Tested?

  • I have tested the install script on MacOS
  • I have tested the install script on Linux

The script claims to support FreeBSD but doesn't - it can't find a binary to download.

@davidkna
Copy link
Member

davidkna commented Jun 5, 2022

I think you can just use the tar -o flag.

@davidkna davidkna changed the title set owner and group on installed binary if installed as root fix(install): ignore tarfile ownership values when installing as root Jun 5, 2022
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.

ownership of starship binary created by install.sh
4 participants