Skip to content

Commit

Permalink
Fix CLI params normalization (#5661) [e2e prod]
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
  • Loading branch information
bentsherman authored and pditommaso committed Jan 20, 2025
1 parent eb092c9 commit 42a9d8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ class CmdRun extends CmdBase implements HubOptions {
addParam((Map)nested, key.substring(p+1), value, path, fullKey)
}
else {
params.put(key.replaceAll(DOT_ESCAPED,'.'), parseParamValue(value))
addParam0(params, key.replaceAll(DOT_ESCAPED,'.'), parseParamValue(value))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,16 @@ class CmdRunTest extends Specification {

when:
def params = [:]
CmdRun.addParam0(params, 'alphaBeta', 1)
CmdRun.addParam0(params, 'alpha-beta', 10)
CmdRun.addParam(params, 'alphaBeta', '1')
CmdRun.addParam(params, 'alpha-beta', '10')
then:
params['alphaBeta'] == 10
!params.containsKey('alpha-beta')

when:
params = [:]
CmdRun.addParam0(params, 'aaa-bbb-ccc', 1)
CmdRun.addParam0(params, 'aaaBbbCcc', 10)
CmdRun.addParam(params, 'aaa-bbb-ccc', '1')
CmdRun.addParam(params, 'aaaBbbCcc', '10')
then:
params['aaaBbbCcc'] == 10
!params.containsKey('aaa-bbb-ccc')
Expand Down

0 comments on commit 42a9d8a

Please sign in to comment.