Skip to content

Commit

Permalink
fix: fix windows path
Browse files Browse the repository at this point in the history
Signed-off-by: zongz <zongzhe1024@163.com>
  • Loading branch information
zong-zhe committed Nov 7, 2024
1 parent 636b1e2 commit 43c507c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/downloader/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,9 @@ func (source *Source) FromString(sourceStr string) error {
source.ModSpec = &ModSpec{}
source.ModSpec.FromString(sourceUrl.String())
// There is a case where there is only 'ModSpec'
} else if sourceUrl.Path != "" {
// On winodws, the path url will be parsed as 'Opaque'
// On linux, the path url will be parsed as 'Path'
} else if sourceUrl.Path != "" || sourceUrl.Opaque != "" {
source.Local = &Local{}
source.Local.FromString(sourceUrl.String())
}
Expand Down

0 comments on commit 43c507c

Please sign in to comment.