environment-variables

Knife ssh not loading environment variables

心不动则不痛 提交于 2020-01-17 03:52:25
问题 On my node node_name I've got $JAVA_HOME and other environment variables set in /etc/profile . I'm aware (found that out) that knife ssh isn't a login shell, and so doesn't load the environment variables. Is there a way to load the environment variables without having to source it? Right now I'm forced to do knife ssh 'name:nod_name' 'source /etc/profile; echo $JAVA_HOME' I'm chaining in a few commands during knife ssh including some of the environment variables and loading the /etc/profile

Knife ssh not loading environment variables

霸气de小男生 提交于 2020-01-17 03:52:04
问题 On my node node_name I've got $JAVA_HOME and other environment variables set in /etc/profile . I'm aware (found that out) that knife ssh isn't a login shell, and so doesn't load the environment variables. Is there a way to load the environment variables without having to source it? Right now I'm forced to do knife ssh 'name:nod_name' 'source /etc/profile; echo $JAVA_HOME' I'm chaining in a few commands during knife ssh including some of the environment variables and loading the /etc/profile

VC++ doesn't detect newly created env variable using GetEnvironmentVariable

落花浮王杯 提交于 2020-01-15 09:16:42
问题 I'm using the Win32 function GetEnvironmentVariable to retrieve the value of a variable that I just created. I'm running Windows XP and VC++ 2005. If I run the program from within Visual Studio, it can't find the new variable. If I run it from a command-prompt, it does. I restarted VC++ but same result. I even restarted all instances of Visual Studio but still the same problem. It might get resolved if I reboot the PC but I'm curious why this is so. Here's the code that I'm using: #define

Why does Test-Path cmdlet incorrectly report false when I use an environment variable?

China☆狼群 提交于 2020-01-15 08:52:27
问题 I'm on a Win 7 machine using Powershell 4.0 PS C:\> $psversiontable Name Value ---- ----- PSVersion 4.0 WSManStackVersion 3.0 SerializationVersion 1.1.0.1 CLRVersion 4.0.30319.42000 BuildVersion 6.3.9600.18728 PSCompatibleVersions {1.0, 2.0, 3.0, 4.0} PSRemotingProtocolVersion 2.2 See command line exercise below. The dll exists. The environment variable exists and has the correct path. When I use the the environment variable with Test-Path , it incorrectly reports $false . When I use a string

why .env file configuration in laravel is not working

旧城冷巷雨未停 提交于 2020-01-15 08:26:50
问题 DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE= DB_USERNAME=root DB_PASSWORD= this is my configuration for laravel 5.4 but php artisan migrate is not working and have error and the migrate error Users-MacBook-Pro: ATP Developers php artisan migrate In Connection.php line 664: SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO) (SQL: select * from information_schema.tables where table schema = atp_db and table_name = migrations) In Connector.php

why .env file configuration in laravel is not working

早过忘川 提交于 2020-01-15 08:26:28
问题 DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE= DB_USERNAME=root DB_PASSWORD= this is my configuration for laravel 5.4 but php artisan migrate is not working and have error and the migrate error Users-MacBook-Pro: ATP Developers php artisan migrate In Connection.php line 664: SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO) (SQL: select * from information_schema.tables where table schema = atp_db and table_name = migrations) In Connector.php

Is it possible to use environment variable to specify the desired log level for the log4net based logging system?

纵饮孤独 提交于 2020-01-15 04:14:46
问题 We use log4net for logging. I am wondering if it is possible to use environment variables when specifying the log level. The motivation is simple - our QA folks will not have to edit the config files, they will just set certain environment variable once. In short: We do not want to set the log level in the config file to some constant value, because the same build is run by different teams and different teams have different, but rarely changing logging needs. Right now, after every

Is it possible to use environment variable to specify the desired log level for the log4net based logging system?

一个人想着一个人 提交于 2020-01-15 04:13:07
问题 We use log4net for logging. I am wondering if it is possible to use environment variables when specifying the log level. The motivation is simple - our QA folks will not have to edit the config files, they will just set certain environment variable once. In short: We do not want to set the log level in the config file to some constant value, because the same build is run by different teams and different teams have different, but rarely changing logging needs. Right now, after every

Is it possible to use environment variable to specify the desired log level for the log4net based logging system?

好久不见. 提交于 2020-01-15 04:13:02
问题 We use log4net for logging. I am wondering if it is possible to use environment variables when specifying the log level. The motivation is simple - our QA folks will not have to edit the config files, they will just set certain environment variable once. In short: We do not want to set the log level in the config file to some constant value, because the same build is run by different teams and different teams have different, but rarely changing logging needs. Right now, after every

Inheriting aliases inside UNIX /usr/bin/script

喜夏-厌秋 提交于 2020-01-14 13:50:46
问题 The UNIX "/usr/bin/script" command will create a running transcript of your shell session (see "man script" for more info). However, when inside a script instance, it seems to forget the parent shell's env vars, aliases, etc. The following example demonstrates how the "ll" alias I define is ignored inside "script": zsh> mkdir temp zsh> cd temp zsh> alias "ll=ls -alF" zsh> ll total 24 drwxr-xr-x 2 me mygroup 4096 Feb 18 13:32 ./ drwxr-xr-x 28 me mygroup 8192 Feb 18 13:32 ../ zsh> script a.out