fix create
This commit is contained in:
1 parent
34eac82c7a
commit
bfb79e573d
1 file changed
+3
-3
@@ -541,7 +541,7 @@ def register(location: str):
|
||||
@click.option(
|
||||
"--force", "-f", is_flag=True, help="Overwrite existing file if it already exists"
|
||||
)
|
||||
def create(target: str, completed: bool, template: bool, force: bool):
|
||||
def create(target: str, completed: bool, no_template: bool, force: bool):
|
||||
"""
|
||||
지정된 location을 storage에 생성하는 명령어
|
||||
"""
|
||||
@@ -563,10 +563,10 @@ def create(target: str, completed: bool, template: bool, force: bool):
|
||||
if not force:
|
||||
return
|
||||
|
||||
if not template:
|
||||
if no_template:
|
||||
content = b""
|
||||
else:
|
||||
template_path = TEMPLATES_DIR / f"{lang.value}.txt"
|
||||
template_path = TEMPLATES_DIR / f"template.{lang.value}"
|
||||
if template_path.is_file():
|
||||
content = template_path.read_bytes()
|
||||
click.secho(f"Using template: {template_path}", fg="cyan")
|
||||
|
||||
Reference in new issue
Block a user