Skip to content

Commit

Permalink
Fix returncode when running commands (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
r0x0d authored Jan 16, 2025
1 parent 7b3e4be commit 449f6f2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions command_line_assistant/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,4 @@ def initialize() -> int:
return 1

service = args.func(args)
service.run()
return 0
return service.run()
1 change: 1 addition & 0 deletions packaging/command-line-assistant.spec
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ LICENSE

%changelog
* Wed Jan 22 2025 Rodolfo Olivieri <rolivier@redhat.com> 0.2.0
- Fix returncode when running commands
- Refactor the CLI to be separate commands
- Add an experimental rendering module for client
- Add Command Line Assistant Daemon
Expand Down
6 changes: 3 additions & 3 deletions tests/test_initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_initialize_with_query_command(argv, stdin):
mock_parse.return_value.func = mock_command
result = initialize()

assert result == 0
assert result == 1
mock_command.assert_called_once()


Expand All @@ -67,7 +67,7 @@ def test_initialize_with_history_command():
mock_parse.return_value.func = mock_command
result = initialize()

assert result == 0
assert result == 1
mock_command.assert_called_once()


Expand Down Expand Up @@ -136,5 +136,5 @@ def test_initialize_command_selection(argv, expected_command):

result = initialize()

assert result == 0
assert result == 1
mock_command.assert_called_once()

0 comments on commit 449f6f2

Please sign in to comment.