mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +00:00
Make script file error a bit more obvious
This didn't even mention that it was a script file, it was just filename: File not found Which would be rather confusing if e.g. someone forgot that `--profile` requires an argument.
This commit is contained in:
parent
707f042fc4
commit
91ce41a2b4
1 changed files with 2 additions and 1 deletions
|
@ -563,7 +563,8 @@ int main(int argc, char **argv) {
|
||||||
const char *file = *(argv + (my_optind++));
|
const char *file = *(argv + (my_optind++));
|
||||||
autoclose_fd_t fd(open_cloexec(file, O_RDONLY));
|
autoclose_fd_t fd(open_cloexec(file, O_RDONLY));
|
||||||
if (!fd.valid()) {
|
if (!fd.valid()) {
|
||||||
perror(file);
|
FLOGF(error, _(L"Error reading script file '%s':"), file);
|
||||||
|
perror("error");
|
||||||
} else {
|
} else {
|
||||||
wcstring_list_t list;
|
wcstring_list_t list;
|
||||||
for (char **ptr = argv + my_optind; *ptr; ptr++) {
|
for (char **ptr = argv + my_optind; *ptr; ptr++) {
|
||||||
|
|
Loading…
Reference in a new issue