Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Jun 19, 2024
1 parent 10e5b24 commit c1982ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/shell/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ async fn execute_subshell(
ExecuteResult::Continue(code, _env_changes, handles) => {
// env changes are not propagated
ExecuteResult::Continue(code, Vec::new(), handles)
},
}
}
}

Expand Down
8 changes: 6 additions & 2 deletions src/shell/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -683,12 +683,16 @@ async fn subshells() {
TestBuilder::new()
.directory("sub_dir")
.command("echo $PWD && (cd sub_dir && echo $PWD) && echo $PWD")
.assert_stdout(&format!("$TEMP_DIR\n$TEMP_DIR{FOLDER_SEPERATOR}sub_dir\n$TEMP_DIR\n"))
.assert_stdout(&format!(
"$TEMP_DIR\n$TEMP_DIR{FOLDER_SEPERATOR}sub_dir\n$TEMP_DIR\n"
))
.assert_exit_code(0)
.run()
.await;
TestBuilder::new()
.command("export TEST=1 && (echo $TEST && unset TEST && echo $TEST) && echo $TEST")
.command(
"export TEST=1 && (echo $TEST && unset TEST && echo $TEST) && echo $TEST",
)
.assert_stdout("1\n\n1\n")
.assert_exit_code(0)
.run()
Expand Down

0 comments on commit c1982ae

Please sign in to comment.