[tools] support Env for fish shell
This commit is contained in:
parent
12592458b9
commit
ec9bbaceda
|
@ -219,6 +219,11 @@ def touch_env():
|
|||
if sys.platform != 'win32':
|
||||
env_sh = open(os.path.join(env_dir, 'env.sh'), 'w')
|
||||
env_sh.write('export PATH=~/.env/tools/scripts:$PATH')
|
||||
|
||||
# if fish config exists, generate env.fish
|
||||
if os.path.exists(os.path.join(home_dir, '.config', 'fish', 'config.fish')):
|
||||
env_fish = open(os.path.join(env_dir, 'env.fish'), 'w')
|
||||
env_fish.write('set -gx PATH ~/.env/tools/scripts $PATH')
|
||||
else:
|
||||
if os.path.exists(os.path.join(env_dir, 'tools', 'scripts')):
|
||||
os.environ["PATH"] = os.path.join(env_dir, 'tools', 'scripts') + ';' + os.environ["PATH"]
|
||||
|
|
Loading…
Reference in New Issue