diff --git a/crates/deno_task_shell/src/shell/commands/cd.rs b/crates/deno_task_shell/src/shell/commands/cd.rs index 8191372..5a9fd93 100644 --- a/crates/deno_task_shell/src/shell/commands/cd.rs +++ b/crates/deno_task_shell/src/shell/commands/cd.rs @@ -42,7 +42,8 @@ fn execute_cd(cwd: &Path, args: Vec) -> Result { let mut args = args; if args.is_empty() { // append homedir to args - args.push("~".to_string()); + let home_dir = dirs::home_dir().unwrap(); + args.push(home_dir.to_string_lossy().to_string()); } let path = parse_args(args.clone())?; let new_dir = cwd.join(&path);