pkg/process: properly quote arguments (#963)
This commit is contained in:
parent
6505a6f310
commit
011b889ba7
@ -78,7 +78,7 @@ func SaveConfig(flagset *pflag.FlagSet, outfile string, overrides map[string]int
|
|||||||
switch f.Value.Type() {
|
switch f.Value.Type() {
|
||||||
case "string":
|
case "string":
|
||||||
// save ourselves 250+ lines of code and just double quote strings
|
// save ourselves 250+ lines of code and just double quote strings
|
||||||
fmt.Fprintf(w, "\"%s\"\n", value)
|
fmt.Fprintf(w, "%q\n", value)
|
||||||
default:
|
default:
|
||||||
//assume that everything else doesn't have fancy control characters
|
//assume that everything else doesn't have fancy control characters
|
||||||
fmt.Fprintf(w, "%s\n", value)
|
fmt.Fprintf(w, "%s\n", value)
|
||||||
|
Loading…
Reference in New Issue
Block a user