Skip to content

Commit 0caddf5

Browse files
committed
feat(age): support /dev/stdin
Signed-off-by: Caio Rocha de Oliveira <caiorocoli@gmail.com>
1 parent 495cb37 commit 0caddf5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

age/keysource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ func ClearFileStreamCache() {
420420
// reads a file from the given path, if it is a stream (e.g., /dev/fd/* or /proc/*)
421421
// it caches the content in memory to avoid issues with multiple reads from the same stream.
422422
func readStreamSafe(path string) ([]byte, error) {
423-
isStream := strings.HasPrefix(path, "/dev/fd/") || strings.HasPrefix(path, "/proc/")
423+
isStream := strings.HasPrefix(path, "/dev/fd/") || strings.HasPrefix(path, "/proc/") || strings.HasPrefix(path, "/dev/stdin")
424424

425425
if isStream {
426426
if cached, ok := fileStreamCache.Load(path); ok {

0 commit comments

Comments
 (0)