mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
tools: Make the style of conditional command more consistent
This commit is contained in:
@ -44,7 +44,7 @@ function _omb_upgrade_check {
|
||||
|
||||
# Cancel upgrade if the current user doesn't have write permissions for the
|
||||
# oh-my-bash directory.
|
||||
[[ -w "$OSH" ]] || return 0
|
||||
[[ -w $OSH ]] || return 0
|
||||
|
||||
# Cancel upgrade if git is unavailable on the system
|
||||
type -P git &>/dev/null || return 0
|
||||
|
@ -200,7 +200,7 @@ function _omb_install_main {
|
||||
fi
|
||||
|
||||
local RED GREEN YELLOW BLUE BOLD NORMAL
|
||||
if [[ -t 1 && -n $ncolors && $ncolors -ge 8 ]]; then
|
||||
if [[ -t 1 && $ncolors && $ncolors -ge 8 ]]; then
|
||||
RED=$(tput setaf 1 2>/dev/null || tput AF 1 2>/dev/null)
|
||||
GREEN=$(tput setaf 2 2>/dev/null || tput AF 2 2>/dev/null)
|
||||
YELLOW=$(tput setaf 3 2>/dev/null || tput AF 3 2>/dev/null)
|
||||
@ -278,7 +278,7 @@ function _omb_install_main {
|
||||
return 1
|
||||
}
|
||||
# The Windows (MSYS) Git is not compatible with normal use on cygwin
|
||||
if [[ $OSTYPE = cygwin ]]; then
|
||||
if [[ $OSTYPE == cygwin ]]; then
|
||||
if command git --version | command grep msysgit > /dev/null; then
|
||||
echo "Error: Windows/MSYS Git is not supported on Cygwin"
|
||||
echo "Error: Make sure the Cygwin git package is installed and is first on the path"
|
||||
|
Reference in New Issue
Block a user