Skip to content

Commit

Permalink
Fixed issue #3 by adding if statement to catch if a variable passed i…
Browse files Browse the repository at this point in the history
…n or not.
  • Loading branch information
Phil Cook committed Apr 2, 2014
1 parent 41cf975 commit 6a707db
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions phpswitch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ php_opt_path="$brew_prefix\/opt\/"
php_lib_path="\/libexec\/apache2\/libphp5.so"
php_mod_path="$php_opt_path$php_version$php_lib_path"

# Has the user submitted a version required
if [[ -z "$1" ]]
then
echo "Please set which version you want to switch to. E.g. brew-php-switcher 53"
exit
fi

# What versions of php are installed via brew
for i in ${php_array[@]}
do
Expand Down

0 comments on commit 6a707db

Please sign in to comment.