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

discovery: top-level .env files ignored in discovered tasks #108

Open
licarth opened this issue Aug 20, 2018 · 0 comments
Open

discovery: top-level .env files ignored in discovered tasks #108

licarth opened this issue Aug 20, 2018 · 0 comments
Milestone

Comments

@licarth
Copy link

licarth commented Aug 20, 2018

Example

With this directory structure

root/
├── myke.yml (A)
├── myke.env.local (C)
└── sub/
    └── myke.yml (B)

(A) being :

project: root
discover:
  - sub

(B) being :

project: sub
tasks:
  deploy:
    cmd: echo "deploy with {{.OPTIONAL_ARGS}}"

(C) being :

OPTIONAL_ARGS="myOptionalArgs"

Current behaviour

cd root && myke deploy will return "deploy with ".

root/myke.env.local will be ignored for tasks that are discovered in subs

Behaviour I expect
cd root && myke deploy to return "deploy with myOptionalArgs".

Current workarounds
If we want myke to pick up the extra args, we have to do one of the following :

  • OPTIONAL_ARGS="myOptionalArgs" myke deploy which is slightly verbose. Or export or source to inject it in the env ourselves.
  • proxy our sub/task with a task in root/myke.yml which kind of makes discovery useless.
  • move our root/myke.env.local to sub/. But in real life we have many of those.

Other cases

Additional myke.env.local in sub

root/
├── myke.yml (A)
├── myke.env.local (C)
└── sub/
    ├── myke.yml (B)
    └── myke.env.local (D)

I believe values in (C) should override values in (D), when conflicting. Means export values in (D) first, then values in (C).

@rdsubhas rdsubhas added this to the v1.1.0 milestone Nov 9, 2018
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