frontend: print an error message when the specified script file cannot be opened

This commit is contained in:
2026-05-31 17:34:28 +01:00
parent 187296ca62
commit 8843f2d2a9
+9
View File
@@ -77,6 +77,15 @@ int main(int argc, const char **argv)
status = bshell_file_open(argv[1], &file); status = bshell_file_open(argv[1], &file);
linesrc = &file->f_base; linesrc = &file->f_base;
interactive = false; interactive = false;
if (!FX_OK(status)) {
fprintf(stderr,
"%s: cannot open '%s': %s\n",
argv[0],
argv[1],
bshell_status_get_description(status));
return -1;
}
} else { } else {
#if BSHELL_INTERACTIVE == 1 #if BSHELL_INTERACTIVE == 1
ed = line_ed_create(); ed = line_ed_create();