Skip to content

Commit 9f5cff8

Browse files
author
flowerinthenight
committed
Fix stack list error.
1 parent 0d2351a commit 9f5cff8

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

cmd/stack_list.go

+17-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,23 @@ func stackList(cmd *cobra.Command, args []string) {
9090
}
9191

9292
platform := "?"
93-
if s.Configuration.AWS != "" {
94-
platform = "aws"
93+
if s.Configuration.Vendor != nil {
94+
var vm map[string]interface{}
95+
err = json.Unmarshal(s.Configuration.Vendor, &vm)
96+
cli.ErrorExit(err, 1)
97+
98+
for k, _ := range vm {
99+
switch k {
100+
case "aws", "alicloud":
101+
platform = k
102+
}
103+
}
104+
}
105+
106+
if platform == "?" {
107+
if s.Configuration.AWS != "" {
108+
platform = "aws"
109+
}
95110
}
96111

97112
type cnf_t struct {

cmd/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func VersionCmd() *cobra.Command {
1212
Short: "print the version",
1313
Long: `Print the version.`,
1414
Run: func(cmd *cobra.Command, args []string) {
15-
fmt.Println("v1.0.1")
15+
fmt.Println("v1.0.2")
1616
},
1717
}
1818
}

0 commit comments

Comments
 (0)