Skip to content

Commit

Permalink
Add warning for remove
Browse files Browse the repository at this point in the history
  • Loading branch information
blueraft committed Aug 10, 2024
1 parent 9f19a68 commit 1f89782
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions crates/uv/src/commands/project/remove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,27 @@ pub(crate) async fn remove(
}

let dependency_destination = if let Some(script) = script {
// If we found a PEP 723 script and the user provided a project-only setting, warn.
if package.is_some() {
warn_user_once!(
"`--package` is a no-op for Python scripts with inline metadata, which always run in isolation"
);
}
if locked {
warn_user_once!(
"`--locked` is a no-op for Python scripts with inline metadata, which always run in isolation"
);
}
if frozen {
warn_user_once!(
"`--frozen` is a no-op for Python scripts with inline metadata, which always run in isolation"
);
}
if no_sync {
warn_user_once!(
"`--no_sync` is a no-op for Python scripts with inline metadata, which always run in isolation"
);
}
DependencyDestination::Script(script)
} else {
// Find the project in the workspace.
Expand Down

0 comments on commit 1f89782

Please sign in to comment.