Skip to content

Commit

Permalink
fix(upgrade): fix upgrade when s3 path has =
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanHolstien committed Jun 21, 2022
1 parent e2f1da0 commit 5e6e303
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 5e6e303

Please sign in to comment.