Browse Source

logging fix

Signed-off-by: Alex Meijer <ameijer@kubecost.com>
Alex Meijer 2 years ago
parent
commit
b36a677e7b
1 changed files with 4 additions and 2 deletions
  1. 4 2
      pkg/customcost/pipelineservice.go

+ 4 - 2
pkg/customcost/pipelineservice.go

@@ -59,8 +59,10 @@ func getRegisteredPlugins(configDir string, execDir string) (map[string]*plugin.
 	configs := map[string]*plugin.ClientConfig{}
 	// set up the client config
 	for name, config := range pluginNames {
-		if _, err := os.Stat(fmt.Sprintf(execFmt, execDir, name, runtime.GOOS, version.Architecture)); err != nil {
-			msg := fmt.Sprintf("error reading executable for %s plugin. Plugin executables must be in %s and have name format <plugin name>.ocplugin.<opencost binary archtecture (arm64 or amd64)>", name, execDir)
+		file := fmt.Sprintf(execFmt, execDir, name, runtime.GOOS, version.Architecture)
+		log.Debugf("looking for file: %s", file)
+		if _, err := os.Stat(file); err != nil {
+			msg := fmt.Sprintf("error reading executable for %s plugin. Plugin executables must be in %s and have name format <plugin name>.ocplugin.<os>.<opencost binary archtecture (arm64 or amd64)>", name, execDir)
 			log.Errorf(msg)
 			return nil, fmt.Errorf(msg)
 		}