Merge pull request #702 from tareqsifat/null_check_on_user
added null check on user
This commit is contained in:
7
install
7
install
@@ -830,7 +830,12 @@ wo_init() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "$wo_force_install" = "y" ]; then
|
if [ "$wo_force_install" = "y" ]; then
|
||||||
[ ! -f "$HOME/.gitconfig" ] && { bash -c 'echo -e "[user]\n\tname = $USER\n\temail = root@$HOSTNAME.local" > $HOME/.gitconfig'; }
|
# Check if USER is empty and assign to a variable
|
||||||
|
USER_OR_WORDOPS=${USER:-WordOps}
|
||||||
|
|
||||||
|
[ ! -f "$HOME/.gitconfig" ] && {
|
||||||
|
bash -c "echo -e \"[user]\n\tname = $USER_OR_WORDOPS\n\temail = root@$HOSTNAME.local\" > $HOME/.gitconfig";
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
if [ -f ./setup.py ]; then
|
if [ -f ./setup.py ]; then
|
||||||
wo_version_new=$(grep "version='" setup.py | awk -F "'" '{print $2}' 2>&1)
|
wo_version_new=$(grep "version='" setup.py | awk -F "'" '{print $2}' 2>&1)
|
||||||
|
|||||||
Reference in New Issue
Block a user