-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/windows case sensitivity #22653
Fix/windows case sensitivity #22653
Conversation
This PR fix an issue when trying to uninstall the Elastic Agent on Windows by using a path that doesn't match the system case sensitivity. This make sure the following are considered to be the same. - C:/path-to-agent/elastic-agent uninstall - c:/path-to-agent/elastic-agent uninstall Fixes: #22268
Pinging @elastic/ingest-management (Team:Ingest Management) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you been able to test this? I think there might be more places where case-sensitivity might be causing issues on Windows.
@@ -58,6 +60,15 @@ func RunningInstalled() bool { | |||
execDir = filepath.Dir(filepath.Dir(execDir)) | |||
execPath = filepath.Join(execDir, execName) | |||
} | |||
|
|||
// Windows filesystem is case insensitive and the following paths are the same. | |||
// - C:\TMP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can extract this to paths package and compare paths using paths.AreEqual or something similar
@blakerouse I just tested the workflow referenced in the issue, nothing else I can do a bit more of testing. |
Since this at least fixes the user-reported bug #22268, can we merge it for now and open another issue later if other bugs come up? |
Fix uninstall problem on windows with case sensitivity
This PR fix an issue when trying to uninstall the Elastic Agent on
Windows by using a path that doesn't match the system case sensitivity.
This make sure the following are considered to be the same.
Fixes: #22268
What does this PR do?
Why is it important?
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs