FindSource determines the correct Installer for the given source.
(location string)
| 157 | |
| 158 | // FindSource determines the correct Installer for the given source. |
| 159 | func FindSource(location string) (Installer, error) { |
| 160 | installer, err := existingVCSRepo(location) |
| 161 | if err != nil && err.Error() == "Cannot detect VCS" { |
| 162 | slog.Warn( |
| 163 | "cannot get information about plugin source", |
| 164 | slog.String("location", location), |
| 165 | slog.Any("error", err), |
| 166 | ) |
| 167 | return installer, errors.New("cannot get information about plugin source") |
| 168 | } |
| 169 | return installer, err |
| 170 | } |
| 171 | |
| 172 | // isLocalReference checks if the source exists on the filesystem. |
| 173 | func isLocalReference(source string) bool { |
searching dependent graphs…