diff --git a/rye/src/cli/run.rs b/rye/src/cli/run.rs index d69433c2f4..f2618c47a2 100644 --- a/rye/src/cli/run.rs +++ b/rye/src/cli/run.rs @@ -106,6 +106,11 @@ fn invoke_script( .map(OsString::from) .chain(args.into_iter().skip(1)) .collect(); + + let path = std::path::Path::new(&args[0]); + if path.starts_with("./") { + args[0] = pyproject.root_path().join(path).into(); + } } } Some(Script::External(_)) => {