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

Bug: doubleing the path #1

Open
viztastic opened this issue Sep 13, 2021 · 1 comment
Open

Bug: doubleing the path #1

viztastic opened this issue Sep 13, 2021 · 1 comment

Comments

@viztastic
Copy link

Thanks for the library @buttercubz , suiper helpful.

I think I discovered a bug. When I use env.config() I get the following error:

image

I think the issue is in line 43 of mod.ts

  const env = Deno.readFileSync(join(Deno.cwd(), path));

The issue is that the path = defaultPath and default Path looks like this:

const defaultPath = join(Deno.cwd(), ".env");

So basically it's joining Deno.cwd() twice...

maybe if we replace line 43 with:

path === defaultPath ? defaultPath : join(Deno.cwd(),path)

what do you think?

Happy to submit a PR

@buttercubz
Copy link
Member

@viztastic for sure any pr is welcome

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

2 participants