Skip to content

[Improvement] Better error message when cargo is unavailable #158

@vic1707

Description

@vic1707

It sounds really obvious and dumb but I wanted to check if rust-script requires you to have installed cargo (rust-script doesn't bundle it), which it unsurprisingly does.
I may have missed it, but this isn't written in the docs.

  zsh ❯ cargo                 
zsh: command not found: cargo

  zsh ❯ rustc             
zsh: command not found: rustc

  zsh ❯ rust-script hash     
error: No such file or directory (os error 2) # which file?

But when I make cargo available via dotfiles' . "~/.cargo/env" it works like a charm.

Would be nice to write it in the docs or at least provide a better error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions