Skip to content

Commit edc98bc

Browse files
committed
fix:
1 parent 00de601 commit edc98bc

File tree

2 files changed

+4
-4
lines changed
  • tools-v2/pkg

2 files changed

+4
-4
lines changed

tools-v2/pkg/cli/command/curvebs/list/dir/dir.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func (pCmd *DirCommand) Init(cmd *cobra.Command, args []string) error {
138138
}
139139
pCmd.SetHeader(header)
140140
pCmd.TableNew.SetAutoMergeCellsByColumnIndex(cobrautil.GetIndexSlice(
141-
pCmd.Header, header,
141+
pCmd.Header, []string{cobrautil.ROW_OWNER, cobrautil.ROW_FILE_TYPE, cobrautil.ROW_PARENT_ID},
142142
))
143143
return nil
144144
}
@@ -208,9 +208,7 @@ func (pCmd *DirCommand) RunCommand(cmd *cobra.Command, args []string) error {
208208
rows = append(rows, row)
209209
}
210210
}
211-
list := cobrautil.ListMap2ListSortByKeys(rows, pCmd.Header, []string{
212-
cobrautil.ROW_FILE_NAME,
213-
})
211+
list := cobrautil.ListMap2ListSortByKeys(rows, pCmd.Header, []string{cobrautil.ROW_OWNER, cobrautil.ROW_FILE_TYPE, cobrautil.ROW_PARENT_ID})
214212
pCmd.TableNew.AppendBulk(list)
215213
errRet := cmderror.MergeCmdError(errors)
216214
pCmd.Error = &errRet

tools-v2/pkg/config/bs.go

+2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const (
4848
VIPER_CURVEBS_PASSWORD = "curvebs.root.password"
4949
CURVEBS_DEFAULT_PASSWORD = "root_password"
5050
CURVEBS_DIR = "dir"
51+
VIPER_CURVEBS_DIR = "curvebs.dir"
5152
)
5253

5354
var (
@@ -63,6 +64,7 @@ var (
6364
CURVEBS_USER: VIPER_CURVEBS_USER,
6465
CURVEBS_PASSWORD: VIPER_CURVEBS_PASSWORD,
6566
CURVEBS_ETCDADDR: VIPER_CURVEBS_ETCDADDR,
67+
CURVEBS_DIR: VIPER_CURVEBS_DIR,
6668
}
6769

6870
BSFLAG2DEFAULT = map[string]interface{}{

0 commit comments

Comments
 (0)