Skip to content

Commit

Permalink
Address review comments for singularty cachedir prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
ewels committed May 7, 2021
1 parent 70eca94 commit 19f2d5c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions nf_core/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,11 @@ def prompt_use_singularity_cachedir(self):
# Prompt user for a cache directory path
cachedir_path = None
while cachedir_path is None:
cachedir_path = os.path.abspath(
questionary.path(
"Specify the path:", only_directories=True, style=nf_core.utils.nfcore_question_style
).unsafe_ask()
)
if cachedir_path == os.path.abspath(""):
prompt_cachedir_path = questionary.path(
"Specify the path:", only_directories=True, style=nf_core.utils.nfcore_question_style
).unsafe_ask()
cachedir_path = os.path.abspath(os.path.expanduser(prompt_cachedir_path))
if prompt_cachedir_path == "":
log.error(f"Not using [blue]$NXF_SINGULARITY_CACHEDIR[/]")
cachedir_path = False
elif not os.path.isdir(cachedir_path):
Expand Down

0 comments on commit 19f2d5c

Please sign in to comment.