()
| 102 | } |
| 103 | |
| 104 | func (o *pluginInstallOptions) newInstallerForSource() (installer.Installer, error) { |
| 105 | // Check if source is an OCI registry reference |
| 106 | if strings.HasPrefix(o.source, registry.OCIScheme+"://") { |
| 107 | // Build getter options for OCI |
| 108 | options := []getter.Option{ |
| 109 | getter.WithTLSClientConfig(o.certFile, o.keyFile, o.caFile), |
| 110 | getter.WithInsecureSkipVerifyTLS(o.insecureSkipTLSVerify), |
| 111 | getter.WithPlainHTTP(o.plainHTTP), |
| 112 | getter.WithBasicAuth(o.username, o.password), |
| 113 | } |
| 114 | |
| 115 | return installer.NewOCIInstaller(o.source, options...) |
| 116 | } |
| 117 | |
| 118 | // For non-OCI sources, use the original logic |
| 119 | return installer.NewForSource(o.source, o.version) |
| 120 | } |
| 121 | |
| 122 | func (o *pluginInstallOptions) run(out io.Writer) error { |
| 123 | i, err := o.newInstallerForSource() |
no test coverage detected