Compare commits

...

2 Commits

Author SHA1 Message Date
Devansh Mathur a0991cbbaa Removing if checks and optimizing setting up of default OutputFile as DRONE_OUTPUT. 2025-02-24 16:37:28 +05:30
Devansh Mathur 6420f80694 Adding default OutputFile as DRONE_OUTPUT. 2025-02-24 13:49:13 +05:30
+7 -8
View File
@@ -483,14 +483,13 @@ func (p Plugin) Exec() error {
} }
} }
if p.Output.OutputFile != "" { p.Output.OutputFile = os.Getenv("DRONE_OUTPUT")
var tarPath string var tarPath string
if p.Build.TarPath != "" { if p.Build.TarPath != "" {
tarPath = getTarPath(p.Build.TarPath) tarPath = getTarPath(p.Build.TarPath)
} }
if err = output.WritePluginOutputFile(p.Output.OutputFile, getDigest(p.Build.DigestFile), tarPath); err != nil { if err = output.WritePluginOutputFile(p.Output.OutputFile, getDigest(p.Build.DigestFile), tarPath); err != nil {
fmt.Fprintf(os.Stderr, "failed to write plugin output file at path: %s with error: %s\n", p.Output.OutputFile, err) fmt.Fprintf(os.Stderr, "failed to write plugin output file at path: %s with error: %s\n", p.Output.OutputFile, err)
}
} }
return nil return nil