-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Allow usage of environments #38
Comments
I guess if we make it an argument, it could come before the command to distinguish it from a command argument:
Regarding the two options: Why not both? We could even set the env variable up in a way that it can be used in a shell profile (e.g. |
@lukasbestle I… have no opinion. My use cases are mostly stuff like live services vs. mock services (email sending, third party API, etc), where you defensively set the mock as default and override in production, so setting env in the shell profile is… 🤷🏻♂️ re: order: I think that's too complicated I think long If I can do anything (sketch PR with env maybe?) to have this released faster, let me know |
I get the following errors when trying to enter kirby commands in my website directory, is this related to this issue? I'm running different environment configurations, also testing with
|
@bogdancondorachi What is your @adamkiss I agree, env would probably the easiest and most flexible. I'd still call it |
Hi all, I ran into the same issue, while developing our email check plugin. Is there any news on this? I personally would prefer a I wouldn't mind an argument and the environment variable being implemented, though 😉 |
It's coming to 1.5.0 with the new KIRBY_HOST env variable. |
For many tasks a user might want to do with a cli command, configuration differs for production/staging/dev environments.
Kirby solves this very elegantly with
config.domain.ext.php
files, but these are not available in the cli commands (Logically, even though that was not a fun debugging session).I'd like then, to somehow pass the environment - probably the domain to use, so we could use the existing configuration - to cli.
There are two options:
1.) Use a command argument
kirby custom:command -e production.com -a 'argument for command'
2.) Use an environment value
env env=production.com kirby custom:command -a 'argument for command'
I personally prefer the option 1 (argument), but that would be a first kind of argument not passed through to command, so I'm not sure if that's a good idea or not.
The text was updated successfully, but these errors were encountered: