Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding symlink resolution to app/Console/cake

Otherwise, if you symlink to app/Console/cake the app path gets set to 2
folders above wherever the symlink is defined.
  • Loading branch information...
commit 70ac1c7e331fc43dceb20b8a732ab4f3152ac149 1 parent 2f7f5e1
@AD7six AD7six authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 app/Console/cake
View
6 app/Console/cake
@@ -17,7 +17,8 @@
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
#
################################################################################
-LIB=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && LIB=$LIB/$(basename -- "$0")
+ME=$(readlink -f $0)
+LIB=$(cd -P -- "$(dirname -- "$ME")" && pwd -P) && LIB=$LIB/$(basename -- "$ME")
while [ -h "$LIB" ]; do
DIR=$(dirname -- "$LIB")
@@ -26,8 +27,9 @@ while [ -h "$LIB" ]; do
done
LIB=$(dirname -- "$LIB")/
-APP=$(dirname $(cd $(dirname $0) && pwd))
+APP=$(dirname $(cd $(dirname $ME) && pwd))
+echo $APP
exec php -q "$LIB"cake.php -working "$APP" "$@"
exit;
Please sign in to comment.
Something went wrong with that request. Please try again.