2015-12-17 64 views
1

我已完成this question并解决了我的第一个问题。使用ASP.NET在Mac中设置自定义环境变量5

但现在,我还有一个问题...

什么是创建定制环境变量的正确方法?如果我尝试创建例如的AppSettings:的ConnectionString环境变量,我有这样的错误:

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

谢谢...

+0

如果我的答案解决了您的问题,请不要忘记标记为已回答。 –

+1

完成;)谢谢! – chemitaxis

回答

2

通过__

更换:所以AppSettings:ConnectionString成为AppSettings__ConnectionString

报价来源:

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

Source