From 91ce41a2b49509054be707137ff703e1b09c48ef Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sat, 20 Nov 2021 17:40:47 +0100 Subject: [PATCH] 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. --- src/fish.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fish.cpp b/src/fish.cpp index 7f40b7dd7..e4560e63d 100644 --- a/src/fish.cpp +++ b/src/fish.cpp @@ -563,7 +563,8 @@ int main(int argc, char **argv) { const char *file = *(argv + (my_optind++)); autoclose_fd_t fd(open_cloexec(file, O_RDONLY)); if (!fd.valid()) { - perror(file); + FLOGF(error, _(L"Error reading script file '%s':"), file); + perror("error"); } else { wcstring_list_t list; for (char **ptr = argv + my_optind; *ptr; ptr++) {