feat: [CI-16330]: Adding default OutputFile as DRONE_OUTPUT. (#139)

* Adding default OutputFile as DRONE_OUTPUT.

* Removing if checks and optimizing setting up of default OutputFile as DRONE_OUTPUT.
This commit is contained in:
Devansh Mathur
2025-03-03 18:05:21 +05:30
committed by GitHub
parent 30e1ea9fd8
commit d6153866df
+1 -2
View File
@@ -483,7 +483,7 @@ func (p Plugin) Exec() error {
}
}
if p.Output.OutputFile != "" {
p.Output.OutputFile = os.Getenv("DRONE_OUTPUT")
var tarPath string
if p.Build.TarPath != "" {
tarPath = getTarPath(p.Build.TarPath)
@@ -491,7 +491,6 @@ func (p Plugin) Exec() error {
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)
}
}
return nil
}