mirror of
				https://github.com/astral-sh/uv.git
				synced 2025-11-03 21:23:54 +00:00 
			
		
		
		
	Reduce sensitivity of unknown option error (#3580)
Closes https://github.com/astral-sh/uv/issues/3579.
This commit is contained in:
		
							parent
							
								
									d417daad7e
								
							
						
					
					
						commit
						732410f255
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
					@ -154,8 +154,7 @@ fn find_python(
 | 
				
			||||||
                        // If the Python version is < 3.4, the `-I` flag is not supported, so
 | 
					                        // 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.
 | 
					                        // we can't run the script at all, and need to sniff it from the output.
 | 
				
			||||||
                        Err(Error::PythonSubcommandOutput { stderr, .. })
 | 
					                        Err(Error::PythonSubcommandOutput { stderr, .. })
 | 
				
			||||||
                            if stderr.contains("Unknown option: -I")
 | 
					                            if stderr.contains("Unknown option: -I") =>
 | 
				
			||||||
                                && stderr.contains("usage: python [option]") =>
 | 
					 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
                            // If the user _requested_ a version prior to 3.4, raise an error, as
 | 
					                            // 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
 | 
					                            // 3.4 is the minimum supported version for invoking the interpreter
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue