fix(sagent): error note

This commit is contained in:
Dict Xiong 2025-02-22 19:09:22 +08:00
parent 4af1aa4a4d
commit 270da9ca42
2 changed files with 3 additions and 3 deletions

View File

@ -1,9 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
op=$(command -v op || command -v op.exe) op=$(command -v op || command -v op.exe || true)
if [[ ! -x $op ]]; then if [[ ! -x $op ]]; then
echo "1password cli not found" echo "1password cli not found" > /dev/stderr
exit -1 exit -1
fi fi
"$op" read "op://Personal/id25519-passphrase/$(hostname)" "$op" read "op://Personal/id25519-passphrase/$(hostname)"

View File

@ -49,7 +49,7 @@ add_piv()
add_id25519_with_op() add_id25519_with_op()
{ {
SSH_ASKPASS_REQUIRE=force SSH_ASKPASS="$THIS_DIR/sagent-op.sh" timeout 30s ssh-add ~/.ssh/id_ed25519 || fmt_fatal "timed out when adding the key. probably the passphrase is wrong" SSH_ASKPASS_REQUIRE=force SSH_ASKPASS="$THIS_DIR/sagent-op.sh" timeout 60s ssh-add ~/.ssh/id_ed25519 || fmt_fatal "timed out when adding the key. probably the passphrase is wrong or 1password-cli is not working"
list list
} }