Merge pull request #28099 from jasons42/duplicate-default-workspace
Fix duplicate default state
This commit is contained in:
commit
2e3aa96988
|
@ -23,8 +23,10 @@ func (b *Backend) Workspaces() ([]string, error) {
|
|||
result := make([]string, 1, len(res.Kvs)+1)
|
||||
result[0] = backend.DefaultStateName
|
||||
for _, kv := range res.Kvs {
|
||||
if strings.TrimPrefix(string(kv.Key), b.prefix) != backend.DefaultStateName {
|
||||
result = append(result, strings.TrimPrefix(string(kv.Key), b.prefix))
|
||||
}
|
||||
}
|
||||
sort.Strings(result[1:])
|
||||
|
||||
return result, nil
|
||||
|
|
Loading…
Reference in New Issue