Skip to content
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

elastic-agent install -force on Windows does not work #6612

Open
strawgate opened this issue Jan 27, 2025 · 0 comments
Open

elastic-agent install -force on Windows does not work #6612

strawgate opened this issue Jan 27, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@strawgate
Copy link
Contributor

It looks like force install might be broken on Windows.

If you run elastic-agent install on a device with installed agent it fails as agent is already installed. If you use -force it bypasses that check and sees an installed agent and calls uninstall on that agent. It finds the elastic-agent binary by using exec.LookPath(paths.BinaryName) but the elastic-agent dir isnt added to the path on Windows like it is on macOS and Linux

See:
https://github.com/elastic/elastic-agent/blob/main/internal/pkg/agent/cmd/install.go#L352-L371

Likely related to: #4965

Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants