Fix age-keygen hanging due to pipe buffering
Extract public key from generated file instead of parsing stderr through a pipe, which could cause blocking. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
3
setup
3
setup
@@ -80,8 +80,9 @@ setup_new() {
|
||||
else
|
||||
if has age-keygen; then
|
||||
step "Generating age encryption key..."
|
||||
age-keygen -o "$AGE_KEY_FILE" 2>&1 | grep -i "public key"
|
||||
age-keygen -o "$AGE_KEY_FILE" 2>/dev/null
|
||||
chmod 600 "$AGE_KEY_FILE"
|
||||
grep '^# public key:' "$AGE_KEY_FILE" | sed 's/^# //'
|
||||
else
|
||||
err "age not installed. Run: nix-shell -p age"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user