From 38203f374e2475789eef4be83dcadb8a214b8741 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Fri, 2 Sep 2022 17:26:12 +0200 Subject: [PATCH] CWLTOOL_OPTIONS: ignore an empty string --- cwltool/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cwltool/main.py b/cwltool/main.py index 63e3d8679..ba6666f46 100755 --- a/cwltool/main.py +++ b/cwltool/main.py @@ -1011,7 +1011,9 @@ def main( argsl = sys.argv[1:] addl = [] # type: List[str] if "CWLTOOL_OPTIONS" in os.environ: - addl = os.environ["CWLTOOL_OPTIONS"].split(" ") + c_opts = os.environ["CWLTOOL_OPTIONS"].split(" ") + if len(c_opts) > 1 or c_opts[0] != "": + addl = c_opts parser = arg_parser() argcomplete.autocomplete(parser) args = parser.parse_args(addl + argsl)