-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cue/load: don't hang on files named -
Note that the check is quite carefully placed to still allow `cue eval -` to select stdin, even if the current directory has a file named '-'. Fixes #422 Change-Id: Ic60fa137f929a1102753f1f20a8c7a27728f121c Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7263 Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
- Loading branch information
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# try to trick cue reading from a perpetually open stdin by placing a file | ||
# named '-' in the current directory. | ||
|
||
! cue eval | ||
stdin - | ||
cmp stderr expect-stderr | ||
-- - -- | ||
-- expect-stderr -- | ||
no CUE files in . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters