diff options
author | Benji Dial <benji6283@gmail.com> | 2021-02-17 16:48:13 -0500 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2021-02-17 16:48:13 -0500 |
commit | 302666775a00b1df398ca06b97aa481a6626045d (patch) | |
tree | ca1abe7f8ee0174aec548792073d4daad6ffb824 /src/user | |
parent | 3a3602861226e995d95a8898668cd559c3ca1cf6 (diff) | |
download | portland-os-302666775a00b1df398ca06b97aa481a6626045d.tar.gz |
giving terminal a more helpful error message when it can't start its passed command
Diffstat (limited to 'src/user')
-rw-r--r-- | src/user/terminal/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/user/terminal/main.c b/src/user/terminal/main.c index 08c17e1..3c9eb04 100644 --- a/src/user/terminal/main.c +++ b/src/user/terminal/main.c @@ -225,9 +225,9 @@ void main(const char *cmd) { window = _new_window(width, height, pixbuf); _paint_window(window); - _task_handle_t child_handle = run_command(cmd, this_task); + _task_handle_t child_handle = *cmd ? run_command(cmd, this_task) : 0; if (!child_handle) { - add_sz_ww("Failed to run passed command. Press any key to close.\n"); + add_sz_ww("Either failed to run passed command, or none was passed. Remember, executable needs to be a full path. Press any key to close.\n"); _paint_window(window); while (1) { struct window_action action; |