fix: [CI-14073]: Print absolute lookup path incase dockerfile not present (#163)

This commit is contained in:
Chirag S
2026-01-29 14:01:55 +05:30
committed by GitHub
parent c06fde824e
commit dd3c29c971
+9 -1
View File
@@ -227,7 +227,15 @@ func (p Plugin) Exec() error {
} }
if _, err := os.Stat(p.Build.Dockerfile); os.IsNotExist(err) { if _, err := os.Stat(p.Build.Dockerfile); os.IsNotExist(err) {
return fmt.Errorf("dockerfile does not exist at path: %s", p.Build.Dockerfile)
// Get absolute path for better error message. If path is empty, this will
// return the current working directory, showing where the plugin looked.
absPath, absErr := filepath.Abs(p.Build.Dockerfile)
if absErr != nil {
absPath = p.Build.Dockerfile
}
return fmt.Errorf("dockerfile does not exist at path: %s", absPath)
} }
var tags = p.Build.Tags var tags = p.Build.Tags