File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,11 @@ func NewRootCommand() *RootCommand {
8080 },
8181 }
8282
83+ envCliPath := os .Getenv ("DECKHOUSE_CLI_PATH" )
84+ if envCliPath != "" {
85+ flags .DeckhousePluginsDir = envCliPath
86+ }
87+
8388 rootCmd .registerCommands ()
8489 rootCmd .cmd .SetGlobalNormalizationFunc (cliflag .WordSepNormalizeFunc )
8590
@@ -105,9 +110,14 @@ func (r *RootCommand) registerCommands() {
105110
106111 r .cmd .AddCommand (plugins .NewPluginsCommand (r .logger .Named ("plugins-command" )))
107112
113+ err := os .MkdirAll (flags .DeckhousePluginsDir + "/plugins" , 0755 )
114+ if err != nil {
115+ r .logger .Debug ("Failed to create plugins directory" , slog .String ("error" , err .Error ()))
116+ }
117+
108118 path , err := os .ReadDir (flags .DeckhousePluginsDir + "/plugins" )
109119 if err != nil {
110- r .logger .Warn ("Failed to read plugins directory" , slog .String ("error" , err .Error ()))
120+ r .logger .Debug ("Failed to read plugins directory" , slog .String ("error" , err .Error ()))
111121 }
112122
113123 for _ , plugin := range path {
You can’t perform that action at this time.
0 commit comments