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

[Starship] Update install method, bugfixing, copy-editing #1183

Merged
merged 2 commits into from
Feb 4, 2022

Conversation

fooforge
Copy link
Contributor

Signed up for Uberspace today, explored things a bit and realized that the documented way to install Starship isn't working anymore. Taken this as an opportunity to contribute the below fixes:

cargo install method => curl | sh

The installation via cargo currently fails with the following errors:

Compiling starship v1.2.1
error[E0658]: use of unstable library feature 'command_access'
   --> /home/fooforge/.cargo/registry/src/github.com-1ecc6299db9ec823/starship-1.2.1/src/utils.rs:392:56
    |
392 |             log::info!("Unable to run {:?}, {:?}", cmd.get_program(), error);
    |                                                        ^^^^^^^^^^^
    |
    = note: see issue #44434 <https://github.com/rust-lang/rust/issues/44434> for more information

error[E0658]: use of unstable library feature 'command_access'
   --> /home/fooforge/.cargo/registry/src/github.com-1ecc6299db9ec823/starship-1.2.1/src/utils.rs:436:65
    |
436 |             log::warn!("Executing command {:?} timed out.", cmd.get_program());
    |                                                                 ^^^^^^^^^^^
    |
    = note: see issue #44434 <https://github.com/rust-lang/rust/issues/44434> for more information

error[E0658]: use of unstable library feature 'command_access'
   --> /home/fooforge/.cargo/registry/src/github.com-1ecc6299db9ec823/starship-1.2.1/src/utils.rs:443:21
    |
443 |                 cmd.get_program(),
    |                     ^^^^^^^^^^^
    |
    = note: see issue #44434 <https://github.com/rust-lang/rust/issues/44434> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `starship` due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `starship v1.2.1`, intermediate artifacts can be found at `/tmp/cargo-installN2CzAt`

Caused by:
  build failed

The linked issue rust-lang/rust#44434 did not yield any immediate steps to fix the issue. And, by the looks of it, the installation via cargo also isn't documented on the project's website.

I have therefore changed the guide to use the steps lined out on https://starship.rs/guide/#🚀-installation instead. Given the dangerousness of piping curl to sh I have also added a blurb on how to review the install script before it gets executed.

Fix for loading Starship upon login

The portion of the guide to load Starship upon login by adding a stanza to my .bashrc also didn't work for me on my fresh install, and resulted in the following error message:

-bash: starship: command not found
[fooforge@ara ~]$

This is due to .bashrc being sourced in .bash_profile before the PATH variable gets set. To rectify this, I have simply switched the eval statement to use an absolute path instead.


These two larger changes aside, I have made some small copy-editing changes and added a short section on what to do next with Starship. Given the updates, I have also added my name to the author's list. 😃

I haven't had the chance to run the linter yet, but will revisit once this PR exists.

@michi-zuri As the original author, I'd appreciate if you could take a 👀 at my proposed changes. Thanks!

@michi-zuri
Copy link
Contributor

Hi @fooforge thanks for taking the time to update the guide and kudos for:

  1. figuring out how to install the binary in userspace instead of system-wide.
  2. updating from [email protected] to isabell@stardust

Even cooler would be if starship was installed systemwide by Uberspace, but that's not in our power. I second all the changes you made to the guide. And welcome to Uberspace, it's great to be here!

@fooforge
Copy link
Contributor Author

fooforge commented Feb 2, 2022

@SalocinHB, @nichtmax Are you the right folks to loop in on this PR to get it reviewed and merged?

@nichtmax
Copy link
Member

nichtmax commented Feb 4, 2022

@fooforge we are ☺️ There's more: @luto, @noave, @kimdiallo

We'll take a look soon. Thanks!

@pascoda pascoda self-assigned this Feb 4, 2022
@pascoda pascoda merged commit 6704b83 into Uberspace:main Feb 4, 2022
@pascoda
Copy link
Contributor

pascoda commented Feb 4, 2022

Thanks for fixing the guide, @fooforge !

Just two more things:

  • tell the user (how) to download and execute in separate commands, not all in one go
  • remove the warning about executing scripts and the following code block (as users will be able to inspect the script after downloading it, before executing it)

Also - something I already fixed - if there are files to edit, just tell the user to edit the file without a specific way to do it (see line 78).

After fixing the two issues I described, please contact us at [email protected] to get information on how to claim your uberspace coffee cup reward :)

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.

4 participants