Fix krm exec function working dir

This commit is contained in:
Ahmed AbouZaid
2022-10-09 15:22:42 +02:00
parent 1b1e6ccab0
commit d29febecb7
3 changed files with 29 additions and 3 deletions

View File

@@ -47,8 +47,18 @@ func (l *Loader) Config() *types.PluginConfig {
return l.pc
}
// SetWorkDir sets the working directory for this loader's plugins
func (l *Loader) SetWorkDir(wd string) {
// DeepCopyPluginConfig makes a full copy the actual values of PluginConfig.
func (l *Loader) DeepCopyPluginConfig() {
l.pc = &types.PluginConfig{
PluginRestrictions: l.pc.PluginRestrictions,
BpLoadingOptions: l.pc.BpLoadingOptions,
FnpLoadingOptions: l.pc.FnpLoadingOptions,
HelmConfig: l.pc.HelmConfig,
}
}
// SetPluginConfigWorkingDir sets the working directory for the loader's plugins.
func (l *Loader) SetPluginConfigWorkingDir(wd string) {
l.pc.FnpLoadingOptions.WorkingDir = wd
}