We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d8e419 commit 6da58f4Copy full SHA for 6da58f4
internal/pkg/devcontainers/dockerutils.go
@@ -119,7 +119,7 @@ type SourceInfo struct {
119
// getMountFolderFromFolder walks up the path hierarchy checking for a git repo. If found that is returned, if not the original folder is used
120
func getMountFolderFromFolder(folder string) (string, error) {
121
122
- for currentFolder := folder; currentFolder != ""; currentFolder = path.Dir(currentFolder) {
+ for currentFolder := folder; currentFolder != "" && currentFolder != "/"; currentFolder = path.Dir(currentFolder) {
123
info, err := os.Stat(path.Join(currentFolder, ".git"))
124
if os.IsNotExist(err) {
125
continue // walk up the hierarchy
0 commit comments