From 631c57b4bfbde264b31474a0d44697a9bd48a908 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Wed, 15 Jul 2026 09:10:48 +0900 Subject: [PATCH] git: init --interactive was discarding the identifier and owner entered at the prompt when nip34.json already existed. --- git.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/git.go b/git.go index 8741388..ef8c7b2 100644 --- a/git.go +++ b/git.go @@ -246,11 +246,12 @@ aside from those, there is also: } // override with flags and existing config - config.Identifier = getValue(existingConfig.Identifier, c.String("identifier"), config.Identifier) + // (identifier and ownerStr already hold the flag value, the interactive answer or the default) + config.Identifier = identifier config.Name = getValue(existingConfig.Name, c.String("name"), config.Name) config.Description = getValue(existingConfig.Description, c.String("description"), config.Description) config.Web = getSliceValue(existingConfig.Web, c.StringSlice("web"), config.Web) - config.Owner = getValue(existingConfig.Owner, c.String("owner"), config.Owner) + config.Owner = ownerStr config.GraspServers = getSliceValue(existingConfig.GraspServers, c.StringSlice("grasp-servers"), config.GraspServers) config.EarliestUniqueCommit = getValue(existingConfig.EarliestUniqueCommit, c.String("earliest-unique-commit"), config.EarliestUniqueCommit) maintainers := getSliceValue(existingConfig.Maintainers, c.StringSlice("maintainers"), config.Maintainers)