frontend: print an error message when the specified script file cannot be opened
This commit is contained in:
@@ -77,6 +77,15 @@ int main(int argc, const char **argv)
|
||||
status = bshell_file_open(argv[1], &file);
|
||||
linesrc = &file->f_base;
|
||||
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 {
|
||||
#if BSHELL_INTERACTIVE == 1
|
||||
ed = line_ed_create();
|
||||
|
||||
Reference in New Issue
Block a user