notaryproject / notation

A CLI tool to sign and verify artifacts
https://notaryproject.dev/
Apache License 2.0
340 stars 84 forks source link

fix: `notation plugin install` fails to install a single plugin executable file #858

Closed Two-Hearts closed 8 months ago

Two-Hearts commented 9 months ago

This PR fixes the following bug: When installing a single plugin executable file from URL, the downloaded file name is not preserved. Since Notation relies on file name and file extension to retrieve the plugin name (spec) and check whether it's executable on the OS, the downloaded file name has to be preserved.

This PR depends on PR: https://github.com/notaryproject/notation-go/pull/369.

codecov-commenter commented 9 months ago

Codecov Report

Attention: 21 lines in your changes are missing coverage. Please review.

Comparison is base (e8a112b) 65.14% compared to head (74502b1) 64.91%.

Files Patch % Lines
cmd/notation/internal/plugin/plugin.go 37.50% 13 Missing and 2 partials :warning:
cmd/notation/plugin/install.go 50.00% 5 Missing and 1 partial :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #858 +/- ## ========================================== - Coverage 65.14% 64.91% -0.24% ========================================== Files 45 45 Lines 2717 2736 +19 ========================================== + Hits 1770 1776 +6 - Misses 787 797 +10 - Partials 160 163 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Two-Hearts commented 8 months ago

Based on offline discussion, closing this PR.