mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-28 12:13:55 +08:00
8391f94081
This finds the first broken component, to help people figure out where they misspelt something. E.g. ``` echo foo >/usr/lob/systemd/system/machines.target.wants/var-lib-machines.mount ``` will now show: ``` warning: Path '/usr/lob' does not exist ``` which would help with seeing that it should be "/usr/lib".
17 lines
502 B
Fish
17 lines
502 B
Fish
#RUN: %fish %s
|
|
exec cat <nosuchfile
|
|
#CHECKERR: warning: An error occurred while redirecting file 'nosuchfile'
|
|
#CHECKERR: warning: Path 'nosuchfile' does not exist
|
|
echo "failed: $status"
|
|
#CHECK: failed: 1
|
|
not exec cat <nosuchfile
|
|
#CHECKERR: warning: An error occurred while redirecting file 'nosuchfile'
|
|
#CHECKERR: warning: Path 'nosuchfile' does not exist
|
|
echo "neg failed: $status"
|
|
#CHECK: neg failed: 0
|
|
|
|
# This needs to be last, because it actually runs exec.
|
|
exec cat </dev/null
|
|
echo "not reached"
|
|
|