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:
parent
670ef9bd7c
commit
844ca31894
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue