Use 'shlex' to split default Executable arguments (#10929)
This allows shell commands for `spack edit` to be executed correctly if they have quoted arguments.
This commit is contained in:
		 Seth R. Johnson
					Seth R. Johnson
				
			
				
					committed by
					
						 Peter Scheibel
						Peter Scheibel
					
				
			
			
				
	
			
			
			 Peter Scheibel
						Peter Scheibel
					
				
			
						parent
						
							670ef9bd7c
						
					
				
				
					commit
					844ca31894
				
			| @@ -5,6 +5,7 @@ | ||||
|  | ||||
| import os | ||||
| import re | ||||
| import shlex | ||||
| import subprocess | ||||
| from six import string_types, text_type | ||||
|  | ||||
| @@ -19,7 +20,7 @@ class Executable(object): | ||||
|     """Class representing a program that can be run on the command line.""" | ||||
|  | ||||
|     def __init__(self, name): | ||||
|         self.exe = name.split(' ') | ||||
|         self.exe = shlex.split(name) | ||||
|         self.default_env = {} | ||||
|         self.returncode = None | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user