You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 12, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: agent/src/main.rs
+8-7Lines changed: 8 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
use std::{fs, path::Path};
1
+
use std::{env,fs, path::Path};
2
2
use ssh_agent::agent::Agent;
3
3
use clap::{App,Arg,SubCommand};
4
4
use url::Url;
@@ -23,19 +23,18 @@ fn main() {
23
23
.subcommand(SubCommand::with_name("list-keys")
24
24
.about("List all keys for the caller's IAM identity."))
25
25
.subcommand(SubCommand::with_name("daemon")
26
-
.about("Run the daemon, bind a UNIX domain socket to provide ssh list and sign operations.")
26
+
.about("Run the daemon, bind a UNIX domain socket to provide ssh list and sign operations. Defaults to SSH_AUTH_SOCK if unspecified.")
27
27
.arg(Arg::with_name("bind-to")
28
28
.long("bind-to")
29
29
.short("b")
30
30
.takes_value(true)
31
-
.value_name("PATH")
32
-
.required(true)))
31
+
.value_name("PATH")))
33
32
.setting(clap::AppSettings::SubcommandRequired)
34
33
.get_matches();
35
34
36
35
// Uses an environment variable rather than an argument so that this can be
37
36
// an ECS ValueFrom in an ECS task.
38
-
let ssh_agent_backend_url = Url::parse(&std::env::var("IAM_SSH_AGENT_BACKEND_URL").expect("IAM_SSH_AGENT_BACKEND_URL is required")).expect("IAM_SSH_AGENT_BACKEND_URL is a valid url");
37
+
let ssh_agent_backend_url = Url::parse(&env::var("IAM_SSH_AGENT_BACKEND_URL").expect("IAM_SSH_AGENT_BACKEND_URL is required")).expect("IAM_SSH_AGENT_BACKEND_URL is a valid url");
39
38
let agent = agent::Backend::new(ssh_agent_backend_url);
0 commit comments