Skip to content

Commit

Permalink
Merge pull request #1462 from jedwards4b/fix_for_quoted_args
Browse files Browse the repository at this point in the history
in _check_for_invalid_args ignore quoted strings

If there is a space in an argument then it was quoted in the shell and should be ignored in this test.

Test suite: ./xmlchange --id CLM_BLDNML_OPTS --val "-bgc bgc -crop -irrig=.true."
Test baseline:
Test namelist changes:
Test status: bit for bit
Fixes #1460

User interface changes?:

Code review:
  • Loading branch information
jgfouca authored May 2, 2017
2 parents cc323c2 + 5ecbf30 commit 6b15377
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/lib/CIME/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,8 @@ def run_and_log_case_status(func, phase, caseroot='.'):

def _check_for_invalid_args(args):
for arg in args:
if arg.startswith("--"):
# if arg contains a space then it was originally quoted and we can ignore it here.
if " " in arg or arg.startswith("--"):
continue
if arg.startswith("-") and len(arg) > 2:
if arg == "-value" or arg == "-noecho":
Expand Down

0 comments on commit 6b15377

Please sign in to comment.