From 844ca3189489bd45f3c7aa003165be058899d60f Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Tue, 26 Mar 2019 15:02:32 -0400 Subject: [PATCH] Use 'shlex' to split default Executable arguments (#10929) This allows shell commands for `spack edit` to be executed correctly if they have quoted arguments. --- lib/spack/spack/util/executable.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py index b162cffc43a..603fb5c2ac9 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