Skip to content

Commit

Permalink
Merge pull request #3003 from mirpedrol/fix-recreating-config
Browse files Browse the repository at this point in the history
return directory if base_dir is the root directory
  • Loading branch information
mirpedrol authored May 28, 2024
2 parents b06712a + ae47db3 commit 2f0f4a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- Update output of generation script for API docs to new structure ([#2988](https://github.com/nf-core/tools/pull/2988))
- Add no clobber and put bash options on their own line ([#2991](https://github.com/nf-core/tools/pull/2991))
- update minimal textual version and snapshots ([#2998](https://github.com/nf-core/tools/pull/2998))
- return directory if base_dir is the root directory ([#3003](https://github.com/nf-core/tools/pull/3003))

## [v2.14.1 - Tantalum Toad - Patch](https://github.com/nf-core/tools/releases/tag/2.14.1) - [2024-05-09]

Expand Down
2 changes: 1 addition & 1 deletion nf_core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ def determine_base_dir(directory="."):
config_fn = get_first_available_path(base_dir, CONFIG_PATHS)
if config_fn:
break
return directory if base_dir == start_dir else base_dir
return directory if (base_dir == start_dir or str(base_dir) == base_dir.root) else base_dir


def get_first_available_path(directory, paths):
Expand Down

0 comments on commit 2f0f4a0

Please sign in to comment.