We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ca930b commit 5eb20f4Copy full SHA for 5eb20f4
src/cargo/ops/cargo_install.rs
@@ -119,17 +119,15 @@ pub fn install(
119
// able to run these commands.
120
let dst = root.join("bin").into_path_unlocked();
121
let path = env::var_os("PATH").unwrap_or_default();
122
- for path in env::split_paths(&path) {
123
- if path == dst {
124
- return Ok(());
125
- }
126
+ let dst_in_path = env::split_paths(&path).any(|path| path == dst);
127
128
- config.shell().warn(&format!(
129
- "be sure to add `{}` to your PATH to be \
+ if !dst_in_path {
+ config.shell().warn(&format!(
+ "be sure to add `{}` to your PATH to be \
130
able to run the installed binaries",
131
- dst.display()
132
- ))?;
+ dst.display()
+ ))?;
+ }
133
}
134
135
if scheduled_error {
0 commit comments