Skip to content

Commit 49bedb7

Browse files
authored
feat: fixing login support on windows (#137)
The fix addresses a Windows path issue in the Pulumi file:// URL construction. On Windows, file paths use backslashes, but URLs require forward slashes. The error you saw was occurring because backslashes in the Windows path were creating an invalid URL format. The modification: 1. Creates a backendUrl variable 2. Replaces all backslashes with forward slashes in the URL 3. Uses the properly formatted URL for the backend
1 parent e3233fc commit 49bedb7

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.23
44

55
require (
66
github.com/gkampitakis/go-snaps v0.4.9
7-
github.com/pulumi/pulumi/sdk/v3 v3.157.0
7+
github.com/pulumi/pulumi/sdk/v3 v3.162.0
88
github.com/stretchr/testify v1.10.0
99
google.golang.org/grpc v1.67.1
1010
google.golang.org/protobuf v1.35.1
@@ -72,7 +72,7 @@ require (
7272
github.com/pkg/term v1.1.0 // indirect
7373
github.com/pmezard/go-difflib v1.0.0 // indirect
7474
github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect
75-
github.com/pulumi/esc v0.10.0 // indirect
75+
github.com/pulumi/esc v0.13.0 // indirect
7676
github.com/rivo/uniseg v0.4.4 // indirect
7777
github.com/rogpeppe/go-internal v1.12.0 // indirect
7878
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
161161
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
162162
github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435cARxCW6q9gc0S/Yxz7Mkd38pOb0=
163163
github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE=
164-
github.com/pulumi/esc v0.10.0 h1:jzBKzkLVW0mePeanDRfqSQoCJ5yrkux0jIwAkUxpRKE=
165-
github.com/pulumi/esc v0.10.0/go.mod h1:2Bfa+FWj/xl8CKqRTWbWgDX0SOD4opdQgvYSURTGK2c=
166-
github.com/pulumi/pulumi/sdk/v3 v3.157.0 h1:wqIN+JM/igzOC+XXdch0UKYr3V3k/hjpgt3sS3GzX84=
167-
github.com/pulumi/pulumi/sdk/v3 v3.157.0/go.mod h1:YEbbl0N7eVsgfsL7h5215dDf8GBSe4AnRon7Ya/KIVc=
164+
github.com/pulumi/esc v0.13.0 h1:O2MPR2koScaQ2fXwyer8Q3Dd7z+DCnaDfsgNl5mVNMk=
165+
github.com/pulumi/esc v0.13.0/go.mod h1:IIQo6W6Uzajt6f1RW4QvNxIRDlbK3TNQysnrwBHNo3U=
166+
github.com/pulumi/pulumi/sdk/v3 v3.162.0 h1:0XjCLqmBvxmz1WrhSZj6VT6H+GY85PxIzk5d28xfrMY=
167+
github.com/pulumi/pulumi/sdk/v3 v3.162.0/go.mod h1:GAaHrdv3kWJHbzkFFFflGbTBQXUYu6SF1ZCo+O9jo44=
168168
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
169169
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
170170
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=

pulumitest/opttest/opttest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func DownloadProviderVersion(name, version string) Option {
101101
// Each package is called with `yarn link <package>` on stack creation.
102102
func YarnLink(packages ...string) Option {
103103
return optionFunc(func(o *Options) {
104-
o.YarnLinks = append(o.YarnLinks, filepath.Join(packages...))
104+
o.YarnLinks = append(o.YarnLinks, packages...)
105105
})
106106
}
107107

pulumitest/tempdir.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func tempDirWithoutCleanupOnFailedTest(t PT, desc, tempDir string) string {
101101
ptFatalF(t, "TempDir: %v", c.tempDirErr)
102102
}
103103

104-
dir := fmt.Sprintf("%s%c%03d", c.tempDir, os.PathSeparator, seq)
104+
dir := filepath.ToSlash(filepath.Join(c.tempDir, fmt.Sprintf("%03d", seq)))
105105
if err := os.Mkdir(dir, 0755); err != nil {
106106
ptFatalF(t, "TempDir: %v", err)
107107
}

0 commit comments

Comments
 (0)