Skip to content

Commit

Permalink
Also fix ${PS1:-}
Browse files Browse the repository at this point in the history
  • Loading branch information
certik committed Jan 30, 2025
1 parent 428c642 commit 36eb556
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/deno_task_shell/src/shell/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,10 @@ impl VariableModifier {
match self {
VariableModifier::DefaultValue(default_value) => {
match state.get_var(name) {
Some(v) => Ok((v.clone().into(), None)),
Some(v) => {
let t: Text = Text::new([OtherText(v.clone().to_string())].to_vec());
Ok((t, None))
},
None => {
let v = evaluate_word(default_value.clone(), state, stdin, stderr)
.await
Expand Down

0 comments on commit 36eb556

Please sign in to comment.