Remove netcat dependency (#28920)
Closes #28813 Closes #27749 Release Notes: - Removed the need to have openbsd `netcat` (`nc`) installed on your system in order to enter passwords for `git` or `ssh` (remote development). If you previously installed `netcat` specifically for Zed, you may uninstall it.
This commit is contained in:
parent
63b4b60b79
commit
cbb6c221b3
8 changed files with 72 additions and 22 deletions
|
@ -23,6 +23,7 @@ test-support = ["fs/test-support"]
|
|||
|
||||
[dependencies]
|
||||
anyhow.workspace = true
|
||||
askpass.workspace = true
|
||||
async-watch.workspace = true
|
||||
backtrace = "0.3"
|
||||
chrono.workspace = true
|
||||
|
|
|
@ -8,6 +8,10 @@ use std::path::PathBuf;
|
|||
struct Cli {
|
||||
#[command(subcommand)]
|
||||
command: Option<Commands>,
|
||||
/// Used for SSH/Git password authentication, to remove the need for netcat as a dependency,
|
||||
/// by having Zed act like netcat communicating over a Unix socket.
|
||||
#[arg(long, hide = true)]
|
||||
askpass: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
|
@ -46,6 +50,11 @@ fn main() {
|
|||
|
||||
let cli = Cli::parse();
|
||||
|
||||
if let Some(socket_path) = &cli.askpass {
|
||||
askpass::main(socket_path);
|
||||
return;
|
||||
}
|
||||
|
||||
let result = match cli.command {
|
||||
Some(Commands::Run {
|
||||
log_file,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue