File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -46,22 +46,22 @@ func checkErr(err error) {
4646
4747func usage () {
4848 toolName := filepath .Base (os .Args [0 ])
49- fmt .Println (fmt .Sprintf ("version: 1.0.5 " ))
49+ fmt .Println (fmt .Sprintf ("version: 1.0.8 " ))
5050 fmt .Println (fmt .Sprintf ("Usage: %s <tool> [parameters]" , toolName ))
5151 fmt .Println (fmt .Sprintf (" %s rm <toolname>" , toolName ))
5252 fmt .Println (fmt .Sprintf (" %s add <toolpath> <description>" , toolName ))
5353
54- if _ , err := os .Stat ("conf.yaml" ); os .IsNotExist (err ) {
55- os .Exit (1 )
56- }
57- fmt .Println ("\n Available tools:" )
58-
5954 // 读取 conf.yaml 文件
6055 file , _ := exec .LookPath (os .Args [0 ])
6156 filepaths , _ := filepath .Abs (file )
6257 bin := filepath .Dir (filepaths )
6358 confPath := filepath .Join (bin , "conf.yaml" )
6459
60+ if _ , err := os .Stat (confPath ); os .IsNotExist (err ) {
61+ os .Exit (1 )
62+ }
63+ fmt .Println ("\n Available tools:" )
64+
6565 // 读取 YAML 文件
6666 data , err := os .ReadFile (confPath )
6767 if err != nil {
You can’t perform that action at this time.
0 commit comments