How is useful env in this install.sh script:
env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git $ZSH || {
printf "Error: git clone of oh-my-zsh repo failed\n"
exit 1
}
Is it because of the variable $ZSH?
How is useful env in this install.sh script:
env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git $ZSH || {
printf "Error: git clone of oh-my-zsh repo failed\n"
exit 1
}
Is it because of the variable $ZSH?
The $ZSH variable is defined a couple of lines above so it is not the purpose here.
The env command can be used to run a command/program in a modified environment, but as there are no additional variables specified here, the command will be run in an unmodified environment.
The main purpose in this case is to get rid of aliases and functions that could shadow the command to be run.