From 302666775a00b1df398ca06b97aa481a6626045d Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Wed, 17 Feb 2021 16:48:13 -0500 Subject: giving terminal a more helpful error message when it can't start its passed command --- src/user/terminal/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/user/terminal/main.c') 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; -- cgit v1.2.3