Skip to content

Commit 5f77d95

Browse files
committed
Set git username ane email
For some reason this isn't set by default on the Ubuntu github runner (but is on Windows/Mac).
1 parent 3a9c7e7 commit 5f77d95

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/git.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,30 @@ mod test {
234234

235235
let status = Command::new("git")
236236
.arg("init")
237+
.arg("--initial-branch=master")
237238
.current_dir(dir.path())
238239
.status()
239240
.expect("Failed to run git init");
240241
assert!(status.success());
241242

243+
let status = Command::new("git")
244+
.arg("config")
245+
.arg("user.name")
246+
.arg("Test User")
247+
.current_dir(dir.path())
248+
.status()
249+
.expect("Failed to run git config user.name");
250+
assert!(status.success());
251+
252+
let status = Command::new("git")
253+
.arg("config")
254+
.arg("user.email")
255+
256+
.current_dir(dir.path())
257+
.status()
258+
.expect("Failed to run git config user.email");
259+
assert!(status.success());
260+
242261
let status = Command::new("git")
243262
.arg("add")
244263
.arg(&text_path)

0 commit comments

Comments
 (0)