Skip to content

Commit 5334aa5

Browse files
committed
use workdir instead of assuming parent of repo path() is the working dir
1 parent d3d8f0b commit 5334aa5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ fn run_with_repo(logger: &slog::Logger, config: &Config, repo: &git2::Repository
485485
// This simplifies writing tests that execute from within git-absorb's source directory
486486
// but operate on temporary repositories created elsewhere.
487487
// (The tests could explicitly change directories, but then must be serialized.)
488-
let repo_path = repo.path().parent().and_then(Path::to_str);
488+
let repo_path = repo.workdir().and_then(Path::to_str);
489489
match repo_path {
490490
Some(path) => {
491491
command.args(["-C", path]);

0 commit comments

Comments
 (0)