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

Setting PATH environment variable doesn’t find executable #28

Open
niksy opened this issue Aug 26, 2021 · 3 comments
Open

Setting PATH environment variable doesn’t find executable #28

niksy opened this issue Aug 26, 2021 · 3 comments

Comments

@niksy
Copy link

niksy commented Aug 26, 2021

If I set PATH environment variable in Shellcheck linter settings, it doesn’t read it correctly.

For example, this configuration should find my custom shellcheck executable inside ~/.becky/bin directory, but that doesn’t work. Same configuration for ESLint and Stylelint does work.

{
  "linters": {
    "shellcheck": {
      "selector": "source.shell",
      "env": {
        "PATH": "~/.becky/bin:$PATH"
      }
    }
  }
}

If I set path using global paths property, this does work but I would still like option of setting custom PATH only for Shellcheck and would expect it to work just like for other linters.

@kaste
Copy link
Contributor

kaste commented Oct 8, 2021

That's a known limitation. The "env" mapping is used for the linter (child-) process not to enhance the (parent) lookup process (which would be the shared python plugin host process of Sublime Text).

An implementation must be provided in SublimeLinter core. There is a ticket open over there; shouldn't be too complicated to do actually.

@niksy
Copy link
Author

niksy commented Oct 10, 2021

That's a known limitation. The "env" mapping is used for the linter (child-) process not to enhance the (parent) lookup process (which would be the shared python plugin host process of Sublime Text).

An implementation must be provided in SublimeLinter core. There is a ticket open over there; shouldn't be too complicated to do actually.

Which ticket exactly?

@kaste
Copy link
Contributor

kaste commented Oct 10, 2021

Conecptually it's part of SublimeLinter/SublimeLinter#1795 Using env/PATH is the first step to implement 1795.

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

No branches or pull requests

2 participants