Replace environment variable parser with zed --printenv
outputting JSON (#32637)
Closes: https://github.com/zed-industries/zed/issues/32445 Follow-up to: https://github.com/zed-industries/zed/pull/31799 Release Notes: - Improved handling of environment variables --------- Co-authored-by: Conrad Irwin <conrad@zed.dev>
This commit is contained in:
parent
d280c95d91
commit
71dbe88459
8 changed files with 77 additions and 371 deletions
|
@ -12,6 +12,9 @@ struct Cli {
|
|||
/// by having Zed act like netcat communicating over a Unix socket.
|
||||
#[arg(long, hide = true)]
|
||||
askpass: Option<String>,
|
||||
/// Used for loading the environment from the project.
|
||||
#[arg(long, hide = true)]
|
||||
printenv: bool,
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
|
@ -55,6 +58,11 @@ fn main() {
|
|||
return;
|
||||
}
|
||||
|
||||
if cli.printenv {
|
||||
util::shell_env::print_env();
|
||||
return;
|
||||
}
|
||||
|
||||
let result = match cli.command {
|
||||
Some(Commands::Run {
|
||||
log_file,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue