Skip to content

Commit

Permalink
inspect: fix printing of driver options
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Apr 12, 2022
1 parent b8bcf1d commit 082c83b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions commands/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,10 @@ func runInspect(dockerCli command.Cli, in inspectOptions) error {

var driverOpts []string
for k, v := range n.DriverOpts {
driverOpts = append(driverOpts, fmt.Sprintf("\t%s=%s\n", k, v))
driverOpts = append(driverOpts, fmt.Sprintf("%s=%q", k, v))
}

if len(driverOpts) > 0 {
fmt.Fprintf(w, "Driver Options: %s", strings.Join(driverOpts, ","))
fmt.Fprintf(w, "Driver Options:\t%s\n", strings.Join(driverOpts, " "))
}

if err := ngi.drivers[i].di.Err; err != nil {
Expand Down

0 comments on commit 082c83b

Please sign in to comment.