Skip to content

Commit f929619

Browse files
committed
Sweep unrelated message from unnecessary workspace infromation
1 parent cb7ba3d commit f929619

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/bin/cargo/commands/install.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,16 @@ pub fn cli() -> App {
7575
}
7676

7777
pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult {
78+
let workspace;
7879
if let Some(path) = args.value_of_path("path", config) {
7980
config.reload_rooted_at(path)?;
81+
// Only provide worksapce information for local crate installation
82+
workspace = args.workspace(config).ok();
8083
} else {
8184
config.reload_rooted_at(config.home().clone().into_path_unlocked())?;
85+
workspace = None;
8286
}
8387

84-
let workspace = args.workspace(config).ok();
8588
let mut compile_opts = args.compile_options(
8689
config,
8790
CompileMode::Build,

0 commit comments

Comments
 (0)