From 4c7f9bd4f078411cc30e315a19cda2f4caf30443 Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Thu, 26 Sep 2024 15:35:02 +0200 Subject: [PATCH] Address review comments: Optional RunCommand Signed-off-by: Kemal Akkoyun --- crates/uv/src/commands/project/run.rs | 8 ++++---- crates/uv/src/lib.rs | 14 ++++++-------- crates/uv/tests/run.rs | 4 ++-- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/crates/uv/src/commands/project/run.rs b/crates/uv/src/commands/project/run.rs index 5747ac8fc06a5..956a085529cea 100644 --- a/crates/uv/src/commands/project/run.rs +++ b/crates/uv/src/commands/project/run.rs @@ -53,7 +53,7 @@ use crate::settings::ResolverInstallerSettings; pub(crate) async fn run( project_dir: &Path, script: Option, - command: RunCommand, + command: Option, requirements: Vec, show_resolution: bool, locked: bool, @@ -721,7 +721,7 @@ pub(crate) async fn run( // Check if any run command is given. // If not, print the available scripts for the current interpreter. - if let RunCommand::Empty = command { + let Some(command) = command else { writeln!( printer.stdout(), "Provide a command or script to invoke with `uv run ` or `uv run