From d52699abe7f27fce1d732aafad58fa801fd4b5db Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy Date: Thu, 18 Mar 2021 07:25:58 -0600 Subject: [PATCH] Expand tilde and show error message --- src/app.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app.rs b/src/app.rs index 087afb7..9254178 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1097,6 +1097,7 @@ impl TTApp { } let shell = format!("{} {}", shell, task_uuid); + let shell = shellexpand::tilde(&shell).into_owned(); match shlex::split(&shell) { Some(cmd) => { let mut command = Command::new(&cmd[0]); @@ -1116,10 +1117,7 @@ impl TTApp { )) } } - Err(_) => Err(format!( - "Cannot run `{}`. Check documentation for more information", - shell, - )), + Err(s) => Err(format!("`{}` failed: {}", shell, s,)), } } None => Err(format!("Unable to run `{}`. Cannot shlex split `{}`", shell, shell)),