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

What about providing a standalone CLI? #80

Open
huangjj27 opened this issue May 15, 2022 · 2 comments
Open

What about providing a standalone CLI? #80

huangjj27 opened this issue May 15, 2022 · 2 comments

Comments

@huangjj27
Copy link

I just find out zenv and its CLI feature help me a lot. Would we get a standalone CLI too?

@masklinn
Copy link

FWIW there is a CLI bundled in dotenv: https://github.com/dotenv-rs/dotenv/blob/master/dotenv/src/bin/dotenv.rs

Apparently it's gated behind --features cli because otherwise you get clap even when you're just using the library, which I guess the original maintainer found unhelpful.

@huangjj27
Copy link
Author

huangjj27 commented Jun 27, 2022

Apparently it's gated behind --features cli

I tried this but can't install on Windows 10, it seems that the binary supports unix-like system only:

> cargo install dotenv -f --features cli
    Updating `rsproxy` index
  Installing dotenv v0.15.0
   Compiling winapi v0.3.9
   Compiling unicode-width v0.1.9
   Compiling vec_map v0.8.2
   Compiling strsim v0.8.0
   Compiling bitflags v1.3.2
   Compiling textwrap v0.11.0
   Compiling atty v0.2.14
   Compiling clap v2.34.0
   Compiling dotenv v0.15.0
error[E0433]: failed to resolve: could not find `unix` in `os`
 --> C:\Users\${MyUser}\.cargo\registry\src\rsproxy.cn-8f6827c7555bfaf8\dotenv-0.15.0\src\bin\dotenv.rs:5:14
  |
5 | use std::os::unix::process::CommandExt;
  |              ^^^^ could not find `unix` in `os`

error[E0599]: no method named `exec` found for struct `Command` in the current scope
  --> C:\Users\${MyUser}\.cargo\registry\src\rsproxy.cn-8f6827c7555bfaf8\dotenv-0.15.0\src\bin\dotenv.rs:65:29
   |
65 |         let error = command.exec();
   |                             ^^^^ method not found in `Command`

Some errors have detailed explanations: E0433, E0599.
For more information about an error, try `rustc --explain E0433`.
error: could not compile `dotenv` due to 2 previous errors
error: failed to compile `dotenv v0.15.0`, intermediate artifacts can be found at `C:\Users\${MyUser}\AppData\Local\Temp\cargo-install27FPqx`

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

No branches or pull requests

2 participants