How to set a default environment?
See original GitHub issueI’ve trouble setting a default environment. I tried your example hook (https://httpyac.github.io/plugins/plugin-api.html#provideenvironmentshook) but this seems to just return a list of possible envs? I thought with that running httpyac test.http -e dev,prev
could be simplified to just httpyac test.http
. Any advice how else this could be achieved?
As I could see this could be a feature demanded quite often, what about ‘native’ support with sth like:
{
"$shared": {
"host": "https://mydoman"
},
"$default": "dev",
"dev": {
"user": "mario",
"password": "123456"
},
"prod": {
"user": "mario",
"password": "password$ecure123"
}
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
How to change default Anaconda python environment
Open anaconda prompt & use 'conda env list' to find the location of the environment you wish to use. · Go to the...
Read more >Manage the default environment - Power Platform
Create a solution and add the app and all its dependencies to it. The dependencies include the apps, flows, and tables. The solution...
Read more >What Are the Default Environment Variables in Windows?
What are the default environment variables in Windows? ... Viewing environment variables with the SET command. In Microsoft Windows, environment ...
Read more >How do you set the default environment in Anaconda Navigator?
Right click on you my computer and open properties · Open advanced system settings and click on Environmental Variables · Now select the...
Read more >Setting up a default project environment
Create a new conda environment in the /opt/wakari/anaconda/envs/default directory. EXAMPLE: Using a Python 3.4 base environment, run: · Use conda to install any ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The solution would probably be to provide a
$default
environment in addition to$shared
that is loaded when no environment is present.provideEnvironments
is needed to allow selection of environments in VSCode.provideVariables
is the hook you need. You get current environment selection and can fill your defaults if no env is selected (undefined or empty array) https://httpyac.github.io/plugins/plugin-api.html#providevariableshook