Skip to content

Commit

Permalink
Fix outdated fix message in lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikDanielsson committed Aug 9, 2021
1 parent 0129101 commit 4a4d821
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

* Changed `questionary` `ask()` to `unsafe_ask()` to not catch `KeyboardInterupts` ([#1237](https://github.com/nf-core/tools/issues/1237))
* Fixed bug in `nf-core launch` due to revisions specified with `-r` not being added to nextflow command. ([#1246](https://github.com/nf-core/tools/issues/1246))
* Update 'fix' message in `nf-core lint` to conform to the current command line options. ([#1259](https://github.com/nf-core/tools/issues/1259))

### Modules

Expand Down
4 changes: 3 additions & 1 deletion nf_core/lint_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ def print_fixes(lint_obj, module_lint_obj):
"""Prints available and applied fixes"""

if len(lint_obj.could_fix):
fix_cmd = "nf-core lint {} --fix {}".format(lint_obj.wf_path, " --fix ".join(lint_obj.could_fix))
fix_cmd = "nf-core lint {}--fix {}".format(
"" if lint_obj.wf_path == "." else f"--dir {lint_obj.wf_path}", " --fix ".join(lint_obj.could_fix)
)
console.print(
f"\nTip: Some of these linting errors can automatically be resolved with the following command:\n\n[blue] {fix_cmd}\n"
)
Expand Down

0 comments on commit 4a4d821

Please sign in to comment.