Merge pull request #29 from studiokaiji/fix-always-required-identifier-when-deploy

replaceableオプションが指定されていない場合はidentifierが指定されていなくても入力を求めないようにした
This commit is contained in:
kaiji
2023-08-26 22:05:34 +09:00
committed by GitHub

View File

@@ -170,7 +170,7 @@ func Deploy(basePath string, replaceable bool, htmlIdentifier string) (string, e
} }
// htmlIdentifierの存在チェック // htmlIdentifierの存在チェック
if len(htmlIdentifier) < 1 { if replaceable && len(htmlIdentifier) < 1 {
// htmlIdentifierが指定されていない場合はユーザー入力を受け取る // htmlIdentifierが指定されていない場合はユーザー入力を受け取る
reader := bufio.NewReader(os.Stdin) reader := bufio.NewReader(os.Stdin)
fmt.Print("⌨️ Please type identifier: ") fmt.Print("⌨️ Please type identifier: ")