1
0
mirror of synced 2026-05-03 02:03:31 +00:00

Add plugin management commands

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan
2026-03-30 11:52:24 +03:00
parent e45e46211b
commit 8be056324a
5 changed files with 615 additions and 1 deletions

View File

@@ -228,7 +228,9 @@ func writeStreamToFile(r io.Reader, destPath string) error {
}
if _, err := io.Copy(out, r); err != nil {
out.Close()
if closeErr := out.Close(); closeErr != nil {
return fmt.Errorf("failed to write plugin binary: %w (also failed to close file: %v)", err, closeErr)
}
return fmt.Errorf("failed to write plugin binary: %w", err)
}
return out.Close()