Fix base import path handling in go programgen

This commit is contained in:
Vivek Lakshmanan 2021-01-20 16:04:33 -08:00
parent ef66287b7b
commit 6566b9058e

View file

@ -283,7 +283,7 @@ func (g *generator) getPulumiImport(pkg, vPath, mod string) string {
// All providers don't follow the sdk/go/<package> scheme. Allow ImportBasePath as
// a means to override this assumption.
if info.ImportBasePath != "" {
if info.ImportBasePath != "" && mod != "" {
imp = fmt.Sprintf("%s/%s", info.ImportBasePath, mod)
}