getBaseURL extracts the base Git URL without query parameters. Query parameters like ?dir=path are used by Nix flakes but not by git clone.
()
| 75 | // getBaseURL extracts the base Git URL without query parameters. |
| 76 | // Query parameters like ?dir=path are used by Nix flakes but not by git clone. |
| 77 | func (p *gitPlugin) getBaseURL() string { |
| 78 | baseURL := p.ref.URL |
| 79 | if strings.Contains(baseURL, "?") { |
| 80 | baseURL = strings.Split(baseURL, "?")[0] |
| 81 | } |
| 82 | return baseURL |
| 83 | } |
| 84 | |
| 85 | func (p *gitPlugin) Fetch() ([]byte, error) { |
| 86 | content, err := p.FileContent("plugin.json") |