File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -495,8 +495,15 @@ func extract(workspace project.GoWorkspace) {
495
495
extractorArgs = append (extractorArgs , workspace .ModMode .ArgsForGoVersion (toolchain .GetEnvGoSemVer ())... )
496
496
}
497
497
for _ , module := range workspace .Modules {
498
- relModPath , _ := filepath .Rel (workspace .BaseDir , filepath .Dir (module .Path ))
499
- extractorArgs = append (extractorArgs , relModPath )
498
+ relModPath , relErr := filepath .Rel (workspace .BaseDir , filepath .Dir (module .Path ))
499
+
500
+ if relErr != nil {
501
+ log .Printf (
502
+ "Unable to make module path %s relative to workspace base dir %s: %s\n " ,
503
+ filepath .Dir (module .Path ), workspace .BaseDir , relErr .Error ())
504
+ } else {
505
+ extractorArgs = append (extractorArgs , relModPath )
506
+ }
500
507
}
501
508
502
509
log .Printf ("Running extractor command '%s %v' from directory '%s'.\n " , extractor , extractorArgs , workspace .BaseDir )
You can’t perform that action at this time.
0 commit comments