Skip to content

Commit 36c0988

Browse files
committed
Fix stdin processing on Windows
1 parent ccb8b91 commit 36c0988

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22
**Summary of changes of the command line tool**
33

4+
## v3.1
5+
- **[ FIX ]** Fix stdin processing on Windows
6+
47
## v3.0
58
- **[ FEATURE ]** Support multiple (named) bookmarks to quickly
69
reference often-used files, e.g. `klog total @work`

src/app/retriever.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func (retriever *stdinRetriever) Retrieve(fileArgs ...FileOrBookmarkName) ([]*fi
9595
return nil, nil
9696
}
9797
return []*fileWithContent{{
98-
File: NewFileOrPanic("/dev/stdin"), // Fake file just to fulfill interface
98+
File: nil,
9999
content: stdin,
100100
}}, nil
101101
}

src/app/retriever_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ func TestReturnsStdinInput(t *testing.T) {
7575
files, err := f()
7676
require.Nil(t, err)
7777
require.Len(t, files, 1)
78+
require.Nil(t, files[0].File)
7879
assert.Equal(t, "2021-01-01", files[0].content)
7980
}
8081
}

0 commit comments

Comments
 (0)