Logo
Explore Help
Sign In
h/fish-shell
1
Fork 0
You've already forked fish-shell
mirror of https://github.com/fish-shell/fish-shell.git synced 2026-05-14 05:31:14 -03:00
Code Issues Packages Projects Releases Wiki Activity
Files
27dc4b3c8a1f42e3d5d82d7ab283f29c37811398
fish-shell/tests/checks/source.fish

12 lines
201 B
Fish
Raw Normal View History

Allow builtin source to read from non-regular files Commit a91bf6d88 (builtin.c: builtin_source now checks that its argument is a file., 2005-12-16) fixed an infinite loop for commands like "source /" where the argument is a directory. It did so by erroring out early unless the filename argument is a regular file. This is too restrictive; it disallows reading from special files like /dev/null and fifos. Today we get a sensible error without this check, so remove it.
2024-10-13 10:37:58 +02:00
#RUN: %fish %s
source /dev/null
echo $status
# CHECK: 0
source /
echo $status
# CHECKERR: error: Unable to read input file: Is a directory
# CHECKERR: source: Error while reading file '/'
# CHECK: 1
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.3 Page: 72ms Template: 10ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API