nuta / nsh

A command-line shell like fish, but POSIX compatible.
906 stars 34 forks source link

Unable to install using `cargo install nsh` #44

Closed aleksa-stajcic closed 1 year ago

aleksa-stajcic commented 2 years ago

When trying to install nsh through cargo I get the following error

error[E0061]: this function takes 0 arguments but 1 argument was supplied
    --> .../.cargo/registry/src/github.com-1ecc6299db9ec823/nsh-0.4.2/src/prompt.rs:131:25
     |
131  |     let hostname_cstr = unistd::gethostname(&mut hostname_buf).expect("failed to get hostname");
     |                         ^^^^^^^^^^^^^^^^^^^ ----------------- argument unexpected
     |
note: function defined here
    --> .../.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.25.0/src/unistd.rs:1020:8
     |
1020 | pub fn gethostname() -> Result<OsString> {
     |        ^^^^^^^^^^^
help: remove the extra argument
     |
131  |     let hostname_cstr = unistd::gethostname().expect("failed to get hostname");
     |                         ~~~~~~~~~~~~~~~~~~~~~

For more information about this error, try `rustc --explain E0061`.
error: could not compile `nsh` due to previous error
error: failed to compile `nsh v0.4.2`, intermediate artifacts can be found at `/var/folders/dt/97jrrt3s3yn7z7bgr3rv0wy40000gn/T/cargo-installHlVCo7`

On macOS Monterey 12.5