You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if it was possible to provide default variable values, so that when new developer comes along, the defaults would be active out-of-the-box with no IDE or environment changes. So far I have not found how to do this.
Rest Client $shared Environment is a good starting point, but as far as I can see, it can only work if .vscode/settings.json file is set under version control system (i.e. commited to repository). But then one cannot set own VS code folder settings, without dealing with further merge issues. The out-of-the-box condition also does not check if developers must copy from custom "template" settings file that is under VCS, for example if $shared environment was encoded in .vscode/settings.copyme.json .
Syntax {{$dotenv variableName}} would be otherwise great, but it does not work if there is no .env file found, which is the default condition, until developer explicitly creates that file.
Something like following would be nice to do:
@myvar = {{$dotenv VALUE_FROM_ENVIRONMENT}} OR "defaultvalue"
It would in addition be nice if {{$dotenv variableName}} could be configured to refer other file than .dot. But this is secondary issue, and I have noted there are other similar feature requests.
Similar problem is with $processEnv, when in default case environment does not contain whatever environment variable is read.
Or maybe I have missed some existing conditional variable assignment syntax ?
The text was updated successfully, but these errors were encountered:
It would be great if it was possible to provide default variable values, so that when new developer comes along, the defaults would be active out-of-the-box with no IDE or environment changes. So far I have not found how to do this.
Rest Client
$shared
Environment is a good starting point, but as far as I can see, it can only work if .vscode/settings.json file is set under version control system (i.e. commited to repository). But then one cannot set own VS code folder settings, without dealing with further merge issues. The out-of-the-box condition also does not check if developers must copy from custom "template" settings file that is under VCS, for example if$shared
environment was encoded in .vscode/settings.copyme.json .Syntax {{$dotenv variableName}} would be otherwise great, but it does not work if there is no .env file found, which is the default condition, until developer explicitly creates that file.
Something like following would be nice to do:
@myvar = {{$dotenv VALUE_FROM_ENVIRONMENT}} OR "defaultvalue"
or
@myvar = {{$dotenv VALUE_FROM_ENVIRONMENT}}
@myvar ?= "defaultvalue"
It would in addition be nice if
{{$dotenv variableName}}
could be configured to refer other file than.dot
. But this is secondary issue, and I have noted there are other similar feature requests.Similar problem is with
$processEnv
, when in default case environment does not contain whatever environment variable is read.Or maybe I have missed some existing conditional variable assignment syntax ?
The text was updated successfully, but these errors were encountered: