From 732410f255d4605c69ff5011555ba0eb62efe8ac Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Tue, 14 May 2024 10:40:02 -0400 Subject: [PATCH] Reduce sensitivity of unknown option error (#3580) Closes https://github.com/astral-sh/uv/issues/3579. --- crates/uv-interpreter/src/find_python.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/uv-interpreter/src/find_python.rs b/crates/uv-interpreter/src/find_python.rs index 6e953075e..fa9145dba 100644 --- a/crates/uv-interpreter/src/find_python.rs +++ b/crates/uv-interpreter/src/find_python.rs @@ -154,8 +154,7 @@ fn find_python( // If the Python version is < 3.4, the `-I` flag is not supported, so // we can't run the script at all, and need to sniff it from the output. Err(Error::PythonSubcommandOutput { stderr, .. }) - if stderr.contains("Unknown option: -I") - && stderr.contains("usage: python [option]") => + if stderr.contains("Unknown option: -I") => { // If the user _requested_ a version prior to 3.4, raise an error, as // 3.4 is the minimum supported version for invoking the interpreter