diff --git a/cwltool/main.py b/cwltool/main.py index 63e3d86793..ba6666f469 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)