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

Flux binary not found if installed with Brew #489

Open
jtele2 opened this issue Sep 18, 2023 · 2 comments
Open

Flux binary not found if installed with Brew #489

jtele2 opened this issue Sep 18, 2023 · 2 comments

Comments

@jtele2
Copy link

jtele2 commented Sep 18, 2023

Expected behaviour

If we install the flux binary with brew (the first recommended install method in the flux docs), the GitOps extension cannot find it. The tool should either:

  1. Be able to find it, or
  2. Allow the user to set the location

Actual behaviour

/bin/sh: 1: flux: not found

Steps to reproduce

brew install fluxcd/tap/flux

Right click a workload in GitOps -> press reconcile with source:

Output:

> flux reconcile helmrelease somerelease -n somenamespace --with-source
/bin/sh: 1: flux: not found

Versions

kubectl version: 1.26.0
Flux version: 2.1.0
Git version: 2.34.1
Azure version: N/A
Extension version: 0.25.3
VSCode version: 1.82.2
Operating System (OS) and its version: Ubuntu 20.04 (WSL2)

@kingdonb
Copy link
Collaborator

Thanks for the report! We'll take a look and see if we can repro this.

@juozasg
Copy link
Collaborator

juozasg commented Oct 13, 2023

@jtele2 Thank you for the report!

I've not been able to reproduce the bug on my OS X system. I'm using bash and my homebrew is configured in ~/.profile. Are you using a different shell in your terminal than system default?

The extension copies the PATH variable from the parent VSCode process environment. VSCode uses SHELL env variable to determine which profile files to load (~/.bash_profile, ~/.zprofile or others). If flux command is available in your terminal but not in VSCode it might be because VSCode is not loading the right profile.

If you haven't already can you try running flux in VSCode terminal? If that doesn't work then comparing PATH in your terminal and VSCode terminal can help find why VSCode doesn't have the homebrew PATH. Does the problem persist starting code from the terminal?

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

No branches or pull requests

3 participants