Skip to content

Commit 02b2b76

Browse files
committed
fix: create ephemeral workspace for git source
1 parent 96bd4e0 commit 02b2b76

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/cargo/ops/cargo_install.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ fn make_ws_rustc_target<'gctx>(
816816
source_id: &SourceId,
817817
pkg: Package,
818818
) -> CargoResult<(Workspace<'gctx>, Rustc, String)> {
819-
let mut ws = if source_id.is_git() || source_id.is_path() {
819+
let mut ws = if source_id.is_path() {
820820
Workspace::new(pkg.manifest_path(), gctx)?
821821
} else {
822822
Workspace::ephemeral(pkg, gctx, None, false)?

tests/testsuite/install.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2121,6 +2121,7 @@ fn git_install_same_bin_twice_with_different_commit() {
21212121
"\
21222122
[UPDATING] git repository [..]
21232123
[INSTALLING] bin1 v0.1.0 [..]
2124+
[COMPILING] bin1 v0.1.0 [..]
21242125
[FINISHED] [..]
21252126
[REPLACING] [..]home/.cargo/bin/bin1[..]
21262127
[REPLACED] package `bin1 [..]

0 commit comments

Comments
 (0)