Skip to content

[packmind-cli] Reading PACKMIND_API_KEY_V3 from .env should use all available .env files #43

@vincent-psarga

Description

@vincent-psarga

Description

Currently, packmind-cli checks in the closest .env file to checks if it contains the API key.
In a mono-repo context, users can have multiple .env file and will not replicate the API key in each env file.

Ideally, the cli should use all the env until the git root and not only the closest one.

Steps to Reproduce

  1. Add a .env file at the root of the repo with PACKMIND_API_KEY_V3=...
  2. Add a .env file in a subfolder (eg: apps/frontend) without the API key set
  3. Run packmind-cli whoami inside the sub-folder: it does not take into account the root .envfile.

Expected Behavior

The root .env file should be using for login.

Environment

  • Packmind version:
  • packmind-cli version (if relevant): 0.7.0
  • Browser/OS (if frontend issue):
  • Environment (open-source/cloud/on-prem):

Logs/Screenshots

[Paste logs here]

TODO

  • Add non-regression test
  • Update changelog
  • Update documentation if needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions