Absorb: ask for the passphrase once the archive starts arriving
With gpg --decrypt x.tar.gpg | vault absorb, vault printed its prompt while gpg was still writing to the terminal, which buried it, so the command looked hung. Peek at standard input first: the upstream program has finished with the terminal by the time data arrives, and an empty pipe now fails without asking at all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
1403be8b1c
commit
730877823e
@@ -581,7 +581,11 @@ vault absorb old < archive.tar.gz
|
||||
|
||||
Each file is encrypted straight from the stream, so nothing is unpacked to
|
||||
disk first. Directories need no entry of their own; links, devices and any
|
||||
name that tries to climb out with \file{..} are skipped with a note. If the
|
||||
name that tries to climb out with \file{..} are skipped with a note.
|
||||
vault asks for your passphrase only once the archive starts arriving, so
|
||||
when it comes out of something that asks first, like
|
||||
\cmd{gpg --decrypt secrets.tar.gpg | vault absorb}, gpg's prompt comes
|
||||
and goes before vault's appears. If the
|
||||
archive stops halfway through a file, that file isn't stored and vault
|
||||
stops; everything before it is already safely in.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user