Skip to content

Fix lib install with git url #1143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 20, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Better git url handling
  • Loading branch information
silvanocerza committed Jan 19, 2021
commit ae405a02f6833e7bbdbdda77dfaaaa36bc6e5fca
2 changes: 1 addition & 1 deletion arduino/libraries/librariesmanager/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (lm *LibrariesManager) InstallGitLib(gitURL string) error {

func parseGitURL(gitURL string) (string, error) {
var res string
if strings.HasPrefix(gitURL, "git") || strings.HasPrefix(gitURL, "ssh") {
if strings.HasPrefix(gitURL, "git@") {
// We can't parse these as URLs
i := strings.LastIndex(gitURL, "/")
res = strings.TrimRight(gitURL[i+1:], ".git")
Expand Down