philcook / brew-php-switcher

Brew PHP switcher is a simple shell script to switch your apache and CLI quickly between major versions of PHP. If you support multiple products/projects that are built using either brand new or old legacy PHP functionality. For users of Homebrew (or brew for short) currently only.
MIT License
961 stars 90 forks source link

Creating a file called 101300 #60

Closed REBELinBLUE closed 5 years ago

REBELinBLUE commented 5 years ago

brew-php-switcher is creating a file called 101300 whenever I run it

stephen at MacBook-Pro in ~/Desktop/tmp
$ ls                                                                                                                                                                                                                                 

stephen at MacBook-Pro in ~/Desktop/tmp
$ brew-php-switcher 7.2 -s                                                                                                                                                                                                           
Switching to php@7.2
Switching your shell
Unlinking /usr/local/Cellar/php@7.0/7.0.32_2... 0 symlinks removed
Unlinking /usr/local/Cellar/php@7.1/7.1.25... 25 symlinks removed
Unlinking /usr/local/Cellar/php@7.2/7.2.14... 0 symlinks removed
Unlinking /usr/local/Cellar/php/7.3.1... 0 symlinks removed
Linking /usr/local/Cellar/php@7.2/7.2.14... 25 symlinks created

If you need to have this software first in your PATH instead consider running:
  echo 'set -g fish_user_paths "/usr/local/opt/php@7.2/bin" $fish_user_paths' >> ~/.config/fish/config.fish
  echo 'set -g fish_user_paths "/usr/local/opt/php@7.2/sbin" $fish_user_paths' >> ~/.config/fish/config.fish
All done!

stephen at MacBook-Pro in ~/Desktop/tmp
$ ls                                                                                                                                                                                                                                 
101300

Changing line 25 from

if [ ${osx_version} > 101300 ]; then

to either if (( ${osx_version} > 101300 )); then or if [[ $(echo "$osx_version") -ge 101300 ]]; then fixes it

jameswmcnab commented 5 years ago

I am also seeing this behaviour.