Reputation: 2304
I want to set env variable in shell script. Shell script content is:
#!/bin/bash
export XDEBUG_CONFIG="idekey=PHPSTORM"
I tried both bash bin/enable_debug
and bin/enable_debug
. After both command I get:
$ echo $XDEBUG_CONFIG
$
However if I run export XDEBUG_CONFIG="idekey=PHPSTORM"
directly in cli it works. What's wrong with my method?
Upvotes: 1
Views: 907
Reputation: 351
You can try running your script as below:
. bin/enable_debug
OR
source bin/enable_debug
as indicated by @Aserre
Upvotes: 1