Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ def parse(self, cmd_list: list[str]) -> GradleCLICommand:
# TODO: because our parser is not completed for all cases, should we be more relaxed and use
# parse_unknown_options?
try:
parsed_opts = self.arg_parser.parse_args(options)
parsed_opts = self.arg_parser.parse_intermixed_args(options)
except argparse.ArgumentError as error:
raise CommandLineParseError(f"Failed to parse {' '.join(options)}.") from error
# Even though we have set `exit_on_error`, argparse still exits unexpectedly in some
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def parse(self, cmd_list: list[str]) -> "MavenCLICommand":
# TODO: because our parser is not completed for all cases, should we be more relaxed and use
# parse_unknown_options?
try:
parsed_opts = self.arg_parser.parse_args(options)
parsed_opts = self.arg_parser.parse_intermixed_args(options)
except argparse.ArgumentError as error:
raise CommandLineParseError(f"Failed to parse command {' '.join(options)}.") from error
# Even though we have set `exit_on_error`, argparse still exits unexpectedly in some
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
"gradlew clean build -x test -x boo",
id="test_excluded_tasks",
),
pytest.param(
"gradlew clean -x test -x boo build",
"gradlew clean build -x test -x boo",
id="test_intermixed_args",
),
],
)
def test_comparing_gradle_cli_command_equal(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
"mvn clean package -Dmaven.skip.test",
id="test_default_value_for_system_property",
),
pytest.param(
"mvn clean package -Dmaven.skip.test=true",
"mvn clean -Dmaven.skip.test=true package",
id="test_intermixed_args",
),
],
)
def test_comparing_maven_cli_command_equal(
Expand Down
Loading