Skip to content

Commit

Permalink
chore(cmd/driver): print quoted strings in printenv.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP committed Nov 9, 2023
1 parent 79000a9 commit b67f7d9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cmd/driver/printenv/printenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ func (o *driverPrintenvOptions) RunDriverPrintenv(_ context.Context) error {
if err != nil {
return err
}
fmt.Printf("DRIVER=%s\n", driver.Type.String())
fmt.Printf("DRIVERS_REPO=%s\n", strings.Join(driver.Repos, ","))
fmt.Printf("DRIVER_VERSION=%s\n", driver.Version)
fmt.Printf("DRIVER_NAME=%s\n", driver.Name)
fmt.Printf("DRIVER=%q\n", driver.Type.String())
fmt.Printf("DRIVERS_REPO=%q\n", strings.Join(driver.Repos, ", "))
fmt.Printf("DRIVER_VERSION=%q\n", driver.Version)
fmt.Printf("DRIVER_NAME=%q\n", driver.Name)

kr, err := driverkernel.FetchInfo("", "")
if err != nil {
Expand All @@ -69,12 +69,12 @@ func (o *driverPrintenvOptions) RunDriverPrintenv(_ context.Context) error {
if err != nil {
return err
}
fmt.Printf("TARGET_ID=%s\n", d.String())
fmt.Printf("TARGET_ID=%q\n", d.String())

fixedKr := d.FixupKernel(kr)
fmt.Printf("ARCH=%s\n", fixedKr.Architecture.ToNonDeb())
fmt.Printf("KERNEL_RELEASE=%s\n", fixedKr.String())
fmt.Printf("KERNEL_VERSION=%s\n", fixedKr.KernelVersion)
fmt.Printf("ARCH=%q\n", fixedKr.Architecture.ToNonDeb())
fmt.Printf("KERNEL_RELEASE=%q\n", fixedKr.String())
fmt.Printf("KERNEL_VERSION=%q\n", fixedKr.KernelVersion)

return nil
}

0 comments on commit b67f7d9

Please sign in to comment.