1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-12-26 03:27:30 +00:00

fix(git_commit): fix potential test failure (#4734)

Changes git command used in tests to avoid potential failures 
with lightweight tags.
This commit is contained in:
Foster Z 2022-12-19 00:03:01 +05:30 committed by GitHub
parent eb5a01b773
commit 27d167b7a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -373,16 +373,7 @@ mod tests {
.output()?; .output()?;
let git_tag = create_command("git")? let git_tag = create_command("git")?
.args([ .args(["describe", "--tags"])
"for-each-ref",
"--contains",
"HEAD",
"--sort=-taggerdate",
"--count=1",
"--format",
"%(refname:short)",
"refs/tags",
])
.current_dir(repo_dir.path()) .current_dir(repo_dir.path())
.output()? .output()?
.stdout; .stdout;
@ -443,16 +434,7 @@ mod tests {
.output()?; .output()?;
let git_tag = create_command("git")? let git_tag = create_command("git")?
.args([ .args(["describe", "--tags"])
"for-each-ref",
"--contains",
"HEAD",
"--sort=-taggerdate",
"--count=1",
"--format",
"%(refname:short)",
"refs/tags",
])
.current_dir(repo_dir.path()) .current_dir(repo_dir.path())
.output()? .output()?
.stdout; .stdout;