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

"env" directory is not found anymore #198

Closed
NiewView opened this issue Jun 6, 2023 · 4 comments
Closed

"env" directory is not found anymore #198

NiewView opened this issue Jun 6, 2023 · 4 comments

Comments

@NiewView
Copy link

NiewView commented Jun 6, 2023

Hi,

it seems like since the latest release 6.4.5 the env directory is ignored.
It does not mark the root of a project anymore (as described here https://httpyac.github.io/config/#project-root), nor do the environment files get included in the environment selection.

I have a repository, with an env dir like this without a package.json or .httpyac.json:

env/
├─ Test1.env
├─ Test2.env
Something.http

The enviroments Test1 and Test2 are not found:
image

Even if I add a .httpyac.json like this there are no environments:

{
  "envDirName": "env"
}

only when I directly add them into the httpyac config files a environment is shown:

{
  "envDirName": "env",
  "environments": {
    "Hello": {
      "test": "kflads"
    }
  }
}

image

I guess it is a side-effect of the fix for #194

AnWeber added a commit to AnWeber/httpyac that referenced this issue Jun 9, 2023
@AnWeber
Copy link
Owner

AnWeber commented Jun 9, 2023

I overlooked that the search for the httpyac config files always returns a folder and that's why the fallthrough to the search for package.json and env files doesn't work. I have corrected it.

@AnWeber
Copy link
Owner

AnWeber commented Jun 9, 2023

it is fixed with v6.4.6.

@AnWeber AnWeber closed this as completed Jun 9, 2023
@rishigharpuray-ag
Copy link

.env files are still not being picked up correctly in v6.4.6 either (had the same issue with v6.4.5).

Root directory of my project has a /env folder which contains a local.env file (with a few variables). However, I am unable to switch to this config via the VSCode Environment selector menu.

However, v6.4.4 seems to be working fine.

@AnWeber
Copy link
Owner

AnWeber commented Jun 10, 2023

@rishigharpuray-ag The env directory name is configurable. But unfortunately I have removed the fallback to 'env'. Workaround is currently to configure it manually. I will make an update tomorrow where I will add this back. I am also currently writing tests where I can mock the filesystem extensively and test the constellations for me. i thought they were already there.

AnWeber added a commit to AnWeber/httpyac that referenced this issue Jun 10, 2023
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