Skip to content

Remove trailing dot from Windows PATH entry - #1792

Open
jay23606 wants to merge 1 commit into
cloudflare:masterfrom
jay23606:pr-go/1049-windows-system-path-environment-entry-is
Open

jay23606 wants to merge 1 commit into
cloudflare:masterfrom
jay23606:pr-go/1049-windows-system-path-environment-entry-is

Conversation

@jay23606

@jay23606 jay23606 commented Nov 5, 2026

Copy link
Copy Markdown

Bug

The Windows MSI installer creates a system PATH entry for cloudflared whose value ends with a period, for example C:\Program Files (x86)\cloudflared\.. The value comes from the CFDPATH variable in wix.json, which is set to [INSTALLDIR]..

A trailing dot is not a valid directory entry on Windows.

Change

  • wix.json: change the CFDPATH value from [INSTALLDIR]. to [INSTALLDIR]. INSTALLDIR already ends with a backslash, so the entry is a clean directory path.
  • cmd/cloudflared/wix_test.go: add TestWixPathEnvValueHasNoTrailingDot, which reads wix.json and asserts that the CFDPATH value is exactly [INSTALLDIR].

Testing

  • After the fix, go test -count=1 -run TestWixPathEnvValueHasNoTrailingDot -v ./cmd/cloudflared passes.
  • gofmt -l cmd/cloudflared/wix_test.go reports no files.

I did not build the MSI on this machine, so the installed PATH value has not been checked end to end.

Regression test: TestWixPathEnvValueHasNoTrailingDot in cmd/cloudflared/wix_test.go

Fixes #1049

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛Windows System Path Environment Entry is Incorrectly Including a Dot at the End

1 participant