chemitaxis
chemitaxis

Reputation: 14889

Set custom environments variables in Mac using ASP.NET 5

I have done this question and solved my first problem.

But now, I have another question...

What is the correct way to create custom Environment Variables? If I try to create for example AppSettings:ConnectionString environment variable, I have this error:

-bash: export: `AppSettings:ConnectionString ': not a valid identifier

Thanks...

Upvotes: 1

Views: 178

Answers (1)

Maxime Rouiller
Maxime Rouiller

Reputation: 13699

Replace : by __

So AppSettings:ConnectionString becomes AppSettings__ConnectionString

Quote from source:

To override nested keys through environment variables in shells that don’t support : in variable names replace them with __ (double underscore).

Source

Upvotes: 2

Related Questions