diff options
author | Cyborus <cyborus@noreply.codeberg.org> | 2023-12-19 21:22:41 +0100 |
---|---|---|
committer | Cyborus <cyborus@noreply.codeberg.org> | 2023-12-19 21:22:41 +0100 |
commit | bbe5536b4f8b4dfa9338d3e16c7f15dcb0fbdca4 (patch) | |
tree | 3a0fb957b9bb06f77a4a0762781743a331f2c2b4 | |
parent | Merge pull request 'fix attachment filename' (#30) from attach-fix into main (diff) | |
parent | fix key including newline when read from stdin (diff) | |
download | forgejo-cli-bbe5536b4f8b4dfa9338d3e16c7f15dcb0fbdca4.tar.xz forgejo-cli-bbe5536b4f8b4dfa9338d3e16c7f15dcb0fbdca4.zip |
Merge pull request 'fix key including newline when read from stdin' (#34) from trim-token into main
Reviewed-on: https://codeberg.org/Cyborus/forgejo-cli/pulls/34
-rw-r--r-- | src/auth.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/auth.rs b/src/auth.rs index 44bf7b8..1625414 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -36,7 +36,7 @@ impl AuthCommand { AuthCommand::AddKey { host, user, key } => { let key = match key { Some(key) => key, - None => crate::readline("new key: ").await?, + None => crate::readline("new key: ").await?.trim().to_string(), }; if keys.hosts.get(&user).is_none() { keys.hosts |