You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Check if parent URL is SCP-like (e.g., git@github.com:org/repo.git)
523
-
// These cannot be properly parsed by net/url and relative submodule resolution is not supported.
524
-
ifscpLikeURLRegex.MatchString(parentURL) {
525
-
return"", fmt.Errorf("relative submodule URL %q cannot be resolved: parent URL %q uses SCP-like syntax which is not supported for relative submodule resolution (see https://github.com/coder/envbuilder/issues/492)", submoduleURL, RedactURL(parentURL))
526
-
}
527
-
528
-
// Parse the parent URL
529
-
parentParsed, err:=url.Parse(parentURL)
518
+
// Parse the parent URL using go-git's endpoint parser, which handles
519
+
// SCP-like URLs (git@host:path) in addition to standard URLs.
520
+
parentEP, err:=transport.NewEndpoint(parentURL)
530
521
iferr!=nil {
531
522
return"", fmt.Errorf("parse parent URL: %w", err)
532
523
}
533
524
534
-
// For relative URLs, we need to resolve them against the parent's path
535
-
// The parent path represents a repository (like a file in filesystem terms)
0 commit comments