diff options
author | Seth R. Johnson <johnsonsr@ornl.gov> | 2019-03-26 15:02:32 -0400 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2019-03-26 14:02:32 -0500 |
commit | 844ca3189489bd45f3c7aa003165be058899d60f (patch) | |
tree | e48b46177c4c41d3f1537ccbfa921130da7d1568 /lib | |
parent | 670ef9bd7cc8cc7e07419e41f3dc4f50f51a383d (diff) | |
download | spack-844ca3189489bd45f3c7aa003165be058899d60f.tar.gz spack-844ca3189489bd45f3c7aa003165be058899d60f.tar.bz2 spack-844ca3189489bd45f3c7aa003165be058899d60f.tar.xz spack-844ca3189489bd45f3c7aa003165be058899d60f.zip |
Use 'shlex' to split default Executable arguments (#10929)
This allows shell commands for `spack edit` to be executed correctly if
they have quoted arguments.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/util/executable.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py index b162cffc43..603fb5c2ac 100644 --- a/lib/spack/spack/util/executable.py +++ b/lib/spack/spack/util/executable.py @@ -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 |