Skip to content

Commit

Permalink
Fix command
Browse files Browse the repository at this point in the history
  • Loading branch information
evhub committed Jul 16, 2023
1 parent f77ea72 commit a44b424
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion coconut/command/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def start(self, run=False):

def cmd(self, args=None, argv=None, interact=True, default_target=None, use_dest=None):
"""Process command-line arguments."""
result = None
with self.handling_exceptions():
if args is None:
parsed_args = arguments.parse_args()
Expand Down Expand Up @@ -396,7 +397,8 @@ def execute_args(self, args, interact=True, original_args=None):
if args.profile:
print_timing_info()

return filepaths
# make sure to return inside handling_exceptions to ensure filepaths is available
return filepaths

def process_source_dest(self, source, dest, args):
"""Determine the correct source, dest, package mode to use for the given source, dest, and args."""
Expand Down
2 changes: 1 addition & 1 deletion coconut/root.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
VERSION = "3.0.2"
VERSION_NAME = None
# False for release, int >= 1 for develop
DEVELOP = 22
DEVELOP = 23
ALPHA = False # for pre releases rather than post releases

assert DEVELOP is False or DEVELOP >= 1, "DEVELOP must be False or an int >= 1"
Expand Down
3 changes: 3 additions & 0 deletions coconut/tests/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,9 @@ def comp_runnable(args=[]):
@add_test_func_names
class TestShell(unittest.TestCase):

def test_version(self):
call(["coconut", "--version"])

def test_code(self):
call(["coconut", "-s", "-c", coconut_snip], assert_output=True)

Expand Down

0 comments on commit a44b424

Please sign in to comment.