Skip to content

Commit 1ea7677

Browse files
committed
feat: load config by goNixArgParser helper function
The utility will handle quoted string properly.
1 parent 284a275 commit 1ea7677

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/param/cli.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -239,19 +239,11 @@ func ArgsToCmdResults(cmd *goNixArgParser.Command, args []string) (results []*go
239239
continue
240240
}
241241

242-
configStr, err := os.ReadFile(config)
242+
configArgs, err := goNixArgParser.LoadConfigArgs(config)
243243
if err != nil {
244244
errs = append(errs, err)
245245
continue
246246
}
247-
if len(configStr) == 0 {
248-
continue
249-
}
250-
251-
configArgs := strings.Fields(string(configStr))
252-
if len(configArgs) == 0 {
253-
continue
254-
}
255247

256248
foundConfig = true
257249
configs = append(configs, configArgs...)

0 commit comments

Comments
 (0)