Skip to content

Commit

Permalink
chore: prevent toml double quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Jun 9, 2023
1 parent 422e6c7 commit ff64777
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packaging/toml.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ func process(filepath string) error {
continue
}

fmt.Fprintf(pre, "%s = \"%s\"\n", key, val)
quote := `"`
if strings.Contains(val, quote) {
quote = `'`
}

fmt.Fprintf(pre, "%s = %s%s%s\n", key, quote, val, quote)
}
}

Expand Down

0 comments on commit ff64777

Please sign in to comment.