Skip to content

Commit 32bc479

Browse files
committed
fix: remove access_token prefix from YAML output in get-access-token
1 parent eb7c321 commit 32bc479

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

internal/cmd/auth/get-access-token/get_access_token.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"encoding/json"
55
"fmt"
66

7-
"github.com/goccy/go-yaml"
87
"github.com/spf13/cobra"
98
"github.com/stackitcloud/stackit-cli/internal/cmd/params"
109
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
@@ -61,13 +60,7 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
6160

6261
return nil
6362
case print.YAMLOutputFormat:
64-
details, err := yaml.MarshalWithOptions(map[string]string{
65-
"access_token": accessToken,
66-
}, yaml.IndentSequence(true), yaml.UseJSONMarshaler())
67-
if err != nil {
68-
return fmt.Errorf("marshal image list: %w", err)
69-
}
70-
params.Printer.Outputln(string(details))
63+
params.Printer.Outputln(accessToken)
7164

7265
return nil
7366
default:

0 commit comments

Comments
 (0)