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
|
@ -191,11 +191,18 @@ Error: Running Zed as root or via sudo is unsupported.
|
|||
|
||||
let args = Args::parse();
|
||||
|
||||
// `zed --askpass` Makes zed operate in nc/netcat mode for use with askpass
|
||||
if let Some(socket) = &args.askpass {
|
||||
askpass::main(socket);
|
||||
return;
|
||||
}
|
||||
|
||||
// `zed --printenv` Outputs environment variables as JSON to stdout
|
||||
if args.printenv {
|
||||
util::shell_env::print_env();
|
||||
return;
|
||||
}
|
||||
|
||||
if args.dump_all_actions {
|
||||
dump_all_gpui_actions();
|
||||
return;
|
||||
|
@ -1071,6 +1078,10 @@ struct Args {
|
|||
|
||||
#[arg(long, hide = true)]
|
||||
dump_all_actions: bool,
|
||||
|
||||
/// Output current environment variables as JSON to stdout
|
||||
#[arg(long, hide = true)]
|
||||
printenv: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue