Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't prompt to clean no workflows. #4889

Merged
merged 2 commits into from
May 25, 2022
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
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ Fourth Release Candidate for Cylc 8 suitable for acceptance testing.

### Fixes

[#4889](https://github.com/cylc/cylc-flow/pull/4889) - `cylc clean`: don't
prompt if no matching workflows.

[#4881](https://github.com/cylc/cylc-flow/pull/4881) - Fix bug where commands
targeting a specific cycle point would not work if using an abbreviated
cycle point format.
Expand Down
4 changes: 4 additions & 0 deletions cylc/flow/scripts/clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ async def run(*ids: str, opts: 'Values') -> None:
# expand partial workflow ids (including run names)
workflows, multi_mode = await scan(workflows, multi_mode)

if not workflows:
print(f"No workflows matching {', '.join(ids)}")
return

workflows.sort()
if multi_mode and not opts.skip_interactive:
prompt(workflows) # prompt for approval or exit
Expand Down