Skip to content

Substitution environment variable fallback sample #100

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

Merged
merged 4 commits into from
Jul 26, 2019

Conversation

Arkatufus
Copy link
Contributor

@Arkatufus Arkatufus commented Jul 21, 2019

Add a simple environment variable substitution fallback sample to the Fallback sample project.
For debug mode, MY_ENV_PROPERTY is set inside the project properties under Debug tab.
For release mode, the user have to set the environment variable themselves before running the console app.

@Arkatufus Arkatufus requested a review from Aaronontheweb July 21, 2019 20:50
@Arkatufus Arkatufus self-assigned this Jul 21, 2019
@Arkatufus Arkatufus changed the title Substitution environment fallback sample Substitution environment variable fallback sample Jul 21, 2019
"Fallback": {
"commandName": "Project",
"environmentVariables": {
"ENV_MY_PROPERTY": "My environment value"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

if (merged.HasPath("root.environment-property"))
{
var envVal = merged.GetString("root.environment-property");
Console.WriteLine("root.environment-property = {0}", envVal);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb Aaronontheweb merged commit 4eb901c into akkadotnet:dev Jul 26, 2019
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

Successfully merging this pull request may close these issues.

2 participants