Skip to content

Commit

Permalink
Merge pull request #410 from kube-tarian/fix-providersync
Browse files Browse the repository at this point in the history
fix provider sync issue first time
  • Loading branch information
vramk23 authored Feb 21, 2024
2 parents 0342354 + b0ec934 commit 63662da
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,14 @@ func (cp *CrossPlaneApp) deleteProviderConfigs(reqRepoDir string, req *model.Cro
providerMap[strings.ToLower(provider.ProviderName)] = provider
}

providerPath := filepath.Join(reqRepoDir, cp.pluginConfig.ProviderConfigSyncPath)

_, err := os.Stat(providerPath)
if os.IsNotExist(err) {
logger.Infof("no provider folder exist")
return nil
}

fi, err := os.ReadDir(filepath.Join(reqRepoDir, cp.pluginConfig.ProviderConfigSyncPath))
if err != nil {
return err
Expand Down

0 comments on commit 63662da

Please sign in to comment.