From db31b26777dec0247deb1deb4de3cb2cde75124c Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Wed, 4 Sep 2024 10:34:32 -0400 Subject: [PATCH 1/2] fix(shiny create): Use `template.id` for default directory --- shiny/_main_create.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shiny/_main_create.py b/shiny/_main_create.py index b9b4524ec..84c66c5ee 100644 --- a/shiny/_main_create.py +++ b/shiny/_main_create.py @@ -657,7 +657,6 @@ def app_template_questions( mode: Optional[str] = None, dest_dir: Optional[Path] = None, ): - template_dir = template.path template_cli_name = cli_bold(cli_field(template.title or template.id)) if mode == "express" and not template.express_available: @@ -666,7 +665,7 @@ def app_template_questions( ) click.echo(cli_wait(f"Creating {template_cli_name} Shiny app...")) - dest_dir = directory_prompt(dest_dir, template_dir.name) + dest_dir = directory_prompt(dest_dir, template.id) if mode is None and template.express_available: mode = questionary.select( From 71d3d2826e070be7368367d303682269a102076f Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Wed, 4 Sep 2024 10:38:21 -0400 Subject: [PATCH 2/2] docs: Add changelog item --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7ce7e32a..0efda4f95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to Shiny for Python will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [UNRELEASED] + +### Bug fixes + +* `shiny create` now uses the template `id` rather than the directory name as the default directory. (#1666) + ## [1.1.0] - 2024-09-03 ### New features