Skip to content

Commit

Permalink
fix(upgrade): fix upgrade when s3 path has = (#5220)
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanHolstien authored Jun 21, 2022
1 parent e4921ee commit 92d6b04
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,10 @@ public static Map<String, Optional<String>> parseArgs(final List<String> args) {
if (args == null) {
return Collections.emptyMap();
}

final Map<String, Optional<String>> parsedArgs = new HashMap<>();

for (final String arg : args) {
List<String> parsedArg = Arrays.asList(arg.split(KEY_VALUE_DELIMITER));
if (parsedArg.size() > 2) {
throw new RuntimeException("Failed to parse arguments provided as input to upgrade. Multiple '=' delimiters found in "
+ String.format("%s", arg));
}
List<String> parsedArg = Arrays.asList(arg.split(KEY_VALUE_DELIMITER, 2));
parsedArgs.put(parsedArg.get(0), parsedArg.size() > 1 ? Optional.of(parsedArg.get(1)) : Optional.empty());
}
return parsedArgs;
Expand Down

0 comments on commit 92d6b04

Please sign in to comment.