fix: --var flag now allows commas in values (#786)
Changed all --var flags from StringSlice to StringArray. StringSlice splits on commas, breaking values like 'desc=A, B, C'. StringArray only splits on separate --var flags. Affected commands: pour, cook, wisp, mol distill, mol bond, template instantiate 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -113,7 +113,7 @@ func runMolDistill(cmd *cobra.Command, args []string) {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
varFlags, _ := cmd.Flags().GetStringSlice("var")
|
||||
varFlags, _ := cmd.Flags().GetStringArray("var")
|
||||
dryRun, _ := cmd.Flags().GetBool("dry-run")
|
||||
outputDir, _ := cmd.Flags().GetString("output")
|
||||
|
||||
@@ -363,7 +363,7 @@ func subgraphToFormula(subgraph *TemplateSubgraph, name string, replacements map
|
||||
}
|
||||
|
||||
func init() {
|
||||
molDistillCmd.Flags().StringSlice("var", []string{}, "Replace value with {{variable}} placeholder (variable=value)")
|
||||
molDistillCmd.Flags().StringArray("var", []string{}, "Replace value with {{variable}} placeholder (variable=value)")
|
||||
molDistillCmd.Flags().Bool("dry-run", false, "Preview what would be created")
|
||||
molDistillCmd.Flags().String("output", "", "Output directory for formula file")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user