summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-02-17 16:48:13 -0500
committerBenji Dial <benji6283@gmail.com>2021-02-17 16:48:13 -0500
commit302666775a00b1df398ca06b97aa481a6626045d (patch)
treeca1abe7f8ee0174aec548792073d4daad6ffb824 /src
parent3a3602861226e995d95a8898668cd559c3ca1cf6 (diff)
downloadportland-os-302666775a00b1df398ca06b97aa481a6626045d.tar.gz
giving terminal a more helpful error message when it can't start its passed command
Diffstat (limited to 'src')
-rw-r--r--src/user/terminal/main.c4
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;