Skip to content

Commit

Permalink
fix the bad repo suggestion for standalone projects
Browse files Browse the repository at this point in the history
Signed-off-by: Grant Ramsay <seapagan@gmail.com>
  • Loading branch information
seapagan committed Mar 4, 2024
1 parent 2572d4c commit 2451973
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion py_maker/pymaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,16 @@ def get_input(self) -> None:
if self.settings.github_username
else "<your GitHub username>"
)
repo_name = (
sanitize(self.choices.project_dir.name)
if self.choices.package_name == "-"
else self.choices.package_name
)
self.choices.repository = Prompt.ask(
"Repository URL?",
default=(
f"https://github.com/{github_username}/"
f"{re.sub(r'[_.]+', '-', self.choices.package_name)}"
f"{re.sub(r'[_.]+', '-', repo_name.lower())}"
),
)

Expand Down

0 comments on commit 2451973

Please sign in to comment.