File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,10 @@ var Cmd = &cobra.Command{
32
32
Long : strings .TrimSpace (dedent .Dedent (`
33
33
Associates an additional application in a git repository with a wego cluster so that its contents may be managed via GitOps
34
34
` )),
35
- Example : "wego app add ." ,
36
- RunE : runCmd ,
35
+ Example : "wego app add ." ,
36
+ RunE : runCmd ,
37
+ SilenceUsage : true ,
38
+ SilenceErrors : true ,
37
39
PostRun : func (cmd * cobra.Command , args []string ) {
38
40
version .CheckVersion (version .CheckpointParamsWithFlags (version .CheckpointParams (), cmd ))
39
41
},
@@ -86,7 +88,12 @@ func runCmd(cmd *cobra.Command, args []string) error {
86
88
if len (args ) == 0 {
87
89
return fmt .Errorf ("no app --url or app location specified" )
88
90
} else {
89
- params .Dir = args [0 ]
91
+ path , err := filepath .Abs (args [0 ])
92
+ if err != nil {
93
+ return fmt .Errorf ("failed to get absolute path for the repo directory" )
94
+ }
95
+
96
+ params .Dir = path
90
97
}
91
98
}
92
99
You can’t perform that action at this time.
0 commit comments