Skip to content

Commit

Permalink
Fix bad formatting for rill env show (#3026)
Browse files Browse the repository at this point in the history
  • Loading branch information
begelundmuller authored Sep 5, 2023
1 parent faf546b commit bf4a5f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions cli/cmd/env/show.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package env

import (
"os"
"fmt"

"github.com/lensesio/tableprinter"
"github.com/rilldata/rill/cli/pkg/cmdutil"
"github.com/rilldata/rill/cli/pkg/config"
"github.com/rilldata/rill/cli/pkg/variable"
Expand Down Expand Up @@ -31,7 +30,11 @@ func ShowEnvCmd(cfg *config.Config) *cobra.Command {
return err
}

tableprinter.PrintHeadList(os.Stdout, variable.Serialize(resp.Variables), "Project Variables")
vals := variable.Serialize(resp.Variables)
for _, v := range vals {
fmt.Println(v)
}

return nil
},
}
Expand Down
2 changes: 1 addition & 1 deletion cli/pkg/variable/variable.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func Serialize(variables map[string]string) []string {
result := make([]string, len(variables))
i := 0
for k, v := range variables {
result[i] = fmt.Sprintf("%v=%v", k, v)
result[i] = fmt.Sprintf("%s=%q", k, v)
i++
}
return result
Expand Down

0 comments on commit bf4a5f5

Please sign in to comment.