sh: Fix touch error on startup
The xdg-compliance function would check on shell startup if we have a file mentioned by 'PYTHONSTARTUP' and create it if not. However, if there is no env var in the shell calling for this at all it would still try to create a file at an 'empty' path, so this obviously won't work. Added a check that we even have the variable to do work.
This commit is contained in:
parent
f252c628ec
commit
e604e34329
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ export LESSHISTFILE="XDG_STATE_HOME/lesshst"
|
|||
export MPLAYER_HOME="$XDG_CONFIG_HOME/mplayer"
|
||||
export NODE_REPL_HISTORY="$XDG_STATE_HOME/node_repl_history"
|
||||
export NVM_DIR="$XDG_DATA_HOME/nvm"
|
||||
if [ ! -e "$PYTHONSTARTUP" ]; then
|
||||
if [ -n "$PYTHONSTARTUP" ] && [ ! -e "$PYTHONSTARTUP" ]; then
|
||||
mkdir -p "$XDG_CONFIG_HOME/python"
|
||||
touch "$PYTHONSTARTUP"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue