diff --git a/pulumitest/install.go b/pulumitest/install.go index da0bc61..aa91d27 100644 --- a/pulumitest/install.go +++ b/pulumitest/install.go @@ -13,7 +13,7 @@ func (a *PulumiTest) Install() string { cmd.Dir = a.source out, err := cmd.CombinedOutput() if err != nil { - a.t.Fatalf("failed to installing packages and plugins: %s\n%s", err, out) + a.t.Fatalf("failed to install packages and plugins: %s\n%s", err, out) } return string(out) } diff --git a/pulumitest/newStack.go b/pulumitest/newStack.go index 020ed11..005620a 100644 --- a/pulumitest/newStack.go +++ b/pulumitest/newStack.go @@ -100,11 +100,16 @@ func (pt *PulumiTest) NewStack(stackName string, opts ...optnewstack.NewStackOpt } sort.Strings(providerPluginNames) for _, name := range providerPluginNames { - path := providerPluginPaths[providers.ProviderName(name)] + relPath := providerPluginPaths[providers.ProviderName(name)] + absPath, err := filepath.Abs(relPath) + if err != nil { + pt.t.Fatalf("failed to get absolute path for %s: %s", relPath, err) + } + found := false for _, provider := range providerPlugins { if provider.Name == name { - provider.Path = path + provider.Path = absPath found = true break } @@ -112,7 +117,7 @@ func (pt *PulumiTest) NewStack(stackName string, opts ...optnewstack.NewStackOpt if !found { providerPlugins = append(providerPlugins, workspace.PluginOptions{ Name: name, - Path: path, + Path: absPath, }) } }