Skip to content

Commit a65fad0

Browse files
committed
don't print summary of single crate install
1 parent 497c297 commit a65fad0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/cargo/ops/cargo_install.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ pub fn install(root: Option<&str>,
6464
let root = resolve_root(root, opts.config)?;
6565
let map = SourceConfigMap::new(opts.config)?;
6666

67-
if krates.is_empty() {
68-
install_one(root, map, None, source_id, vers, opts, force)
67+
if krates.len() <= 1 {
68+
install_one(root, map, krates.into_iter().next(), source_id, vers, opts, force)
6969
} else {
7070
let mut success = vec![];
7171
let mut errors = vec![];
@@ -97,6 +97,7 @@ fn install_one(root: Filesystem,
9797

9898
static ALREADY_UPDATED: AtomicBool = ATOMIC_BOOL_INIT;
9999
let needs_update = !ALREADY_UPDATED.load(Ordering::SeqCst);
100+
ALREADY_UPDATED.store(true, Ordering::SeqCst);
100101

101102
let config = opts.config;
102103

@@ -124,8 +125,6 @@ fn install_one(root: Filesystem,
124125
specify alternate source".into()))?
125126
};
126127

127-
ALREADY_UPDATED.store(true, Ordering::SeqCst);
128-
129128
let mut td_opt = None;
130129
let overidden_target_dir = if source_id.is_path() {
131130
None

0 commit comments

Comments
 (0)