Skip to content

Commit

Permalink
Merge pull request #6 from arifmasood/issue4fix
Browse files Browse the repository at this point in the history
Issue 4 - resolve 'cask not installed issue' coming because of 'type -p cask'
  • Loading branch information
meabed authored Oct 3, 2018
2 parents 7ddc888 + 1195561 commit cd16fa7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions bin/appium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class:Appium() {
#######################################
Appium.ConfigureMac() {
this DisplaySysmtemConfig
this ValidateAppiumRequiremetns
this ValidateAppiumRequirements
this ConfigureAndroidSDK
this InstallBrewPackages
this InstallBrewCaskPackages
Expand Down Expand Up @@ -208,7 +208,7 @@ EOS
# Returns:
# None
#######################################
Appium.ValidateAppiumRequiremetns() {
Appium.ValidateAppiumRequirements() {
# Exit if the xcode is not installed
if ! type -p xcode-select &>/dev/null; then
output "$(UI.Color.Red)$(UI.Powerline.Fail) Sorry, Xcode NOT found!$(UI.Color.Default)
Expand Down Expand Up @@ -244,7 +244,7 @@ EOS
fi

# Check if brew cask is installed
if ! type -p cask &>/dev/null; then
if ! brew info cask &>/dev/null; then
output "$(UI.Color.Red)$(UI.Powerline.Fail) Sorry, Homebrew-Cask NOT found!$(UI.Color.Default)
$(UI.Color.Green)$(UI.Powerline.PointingArrow) Run the following command to install Homebrew-Cask:$(UI.Color.Default)
brew tap caskroom/cask"
Expand Down Expand Up @@ -305,7 +305,7 @@ EOS
# None
#######################################
Appium.ConfigureWindows() {
throw "Sorry, currently this script only supporte mac."
throw "Sorry, currently this script only supports mac."
}

#######################################
Expand All @@ -316,7 +316,7 @@ EOS
# None
#######################################
Appium.ConfigureLinux() {
throw "Sorry, currently this script only supporte mac."
throw "Sorry, currently this script only supports mac."
}

#######################################
Expand All @@ -327,7 +327,7 @@ EOS
# None
#######################################
Appium.StartServer() {
this ValidateAppiumRequiremetns
this ValidateAppiumRequirements

output "$(UI.Powerline.PointingArrow)$(UI.Color.Default) Killing appium server processes."
killProcess appium
Expand All @@ -344,7 +344,7 @@ EOS
# None
#######################################
Appium.StartServerInBackground() {
this ValidateAppiumRequiremetns
this ValidateAppiumRequirements

output "$(UI.Powerline.PointingArrow)$(UI.Color.Default) Killing appium server processes."
killProcess appium
Expand Down Expand Up @@ -376,7 +376,7 @@ EOS
# None
#######################################
Appium.RestartServer() {
this ValidateAppiumRequiremetns
this ValidateAppiumRequirements

output "$(UI.Powerline.PointingArrow)$(UI.Color.Default) Killing appium server processes."
killProcess appium
Expand Down
14 changes: 7 additions & 7 deletions bin/selenium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class:Selenium() {
# None
#######################################
Selenium.ConfigureMac() {
this ValidateSeleniumRequiremetns
this ValidateSeleniumRequirements
this DisplaySysmtemConfig
this InstallBrewPackages
this AlertSetEnvironment
Expand Down Expand Up @@ -151,7 +151,7 @@ EOS
# Returns:
# None
#######################################
Selenium.ValidateSeleniumRequiremetns() {
Selenium.ValidateSeleniumRequirements() {
# Check if Java is installed if not then exit
if ! type -p java &>/dev/null; then
output "$(UI.Color.Red)$(UI.Powerline.Fail) Sorry, java NOT found!$(UI.Color.Default)
Expand Down Expand Up @@ -179,7 +179,7 @@ EOS
fi

# Check if brew cask is installed
if ! type -p cask &>/dev/null; then
if ! brew info cask &>/dev/null; then
output "$(UI.Color.Red)$(UI.Powerline.Fail) Sorry, Homebrew-Cask NOT found!$(UI.Color.Default)
$(UI.Color.Green)$(UI.Powerline.PointingArrow) Run the following command to install Homebrew-Cask:$(UI.Color.Default)
brew tap caskroom/cask"
Expand Down Expand Up @@ -216,7 +216,7 @@ EOS
# None
#######################################
Selenium.ConfigureWindows() {
throw "Sorry, currently this script only supporte mac."
throw "Sorry, currently this script only supports mac."
}

#######################################
Expand All @@ -227,7 +227,7 @@ EOS
# None
#######################################
Selenium.ConfigureLinux() {
throw "Sorry, currently this script only supporte mac."
throw "Sorry, currently this script only supports mac."
}

#######################################
Expand All @@ -238,7 +238,7 @@ EOS
# None
#######################################
Selenium.StartServer() {
this ValidateSeleniumRequiremetns
this ValidateSeleniumRequirements

output "$(UI.Powerline.PointingArrow)$(UI.Color.Default) Killing selenium server processes."
killProcess selenium-server
Expand All @@ -255,7 +255,7 @@ EOS
# None
#######################################
Selenium.StartServerInBackground() {
this ValidateSeleniumRequiremetns
this ValidateSeleniumRequirements

output "$(UI.Powerline.PointingArrow)$(UI.Color.Default) Killing selenium server processes."
killProcess selenium-server
Expand Down

0 comments on commit cd16fa7

Please sign in to comment.