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);
|
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();
|
||||||
|
|||||||
Reference in New Issue
Block a user