Skip to content

Commit

Permalink
Fix crash when running moulti.
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierog committed Feb 22, 2025
1 parent c4238eb commit 8173771
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) for its CLI (Command-Line Interface), i.e. for the `moulti` command.
Although Moulti's Python packages, modules and functions are obviously available, they do not constitute a public API yet.

## Unreleased

### Fixed

- Running `moulti` without any argument used to crash since v1.30.0.

## [1.32.0] - 2025-02-13

### Changed
Expand Down
2 changes: 2 additions & 0 deletions src/moulti/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ def adjust_cli_args(args: list[str]) -> None:
their command line, e.g. "moulti run -- ls -al" instead of "moulti run ls -al".
Detect such cases and inject "--" if it is missing.
"""
if len(args) < 2:
return
if args[1] == 'run':
inject_double_dash_before_command(args, 2)
elif args[1] in ('manpage', 'diff') and args[2] == 'run':
Expand Down

0 comments on commit 8173771

Please sign in to comment.