Skip to content

Commit ea4f53c

Browse files
committed
Fix tests on Linux/MacOS
The tests were failing with error: "could not determine the current user, please set $USER"
1 parent 5ab0be0 commit ea4f53c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/testsuite/init.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,7 @@ fn formats_source() {
663663
fs::write(&paths::root().join("rustfmt.toml"), "tab_spaces = 2").unwrap();
664664

665665
cargo_process("init --lib")
666+
.env("USER", "foo")
666667
.with_stderr("[CREATED] library package")
667668
.run();
668669

@@ -682,6 +683,7 @@ mod tests {
682683
#[cargo_test]
683684
fn ignores_failure_to_format_source() {
684685
cargo_process("init --lib")
686+
.env("USER", "foo")
685687
.env("PATH", "") // pretend that `rustfmt` is missing
686688
.with_stderr("[CREATED] library package")
687689
.run();

0 commit comments

Comments
 (0)