Permalink
Browse files

Merge pull request #14 from lackac/patch-1

Move CACHE_STORE_DIR assignment after setting NPM_VERSION
  • Loading branch information...
2 parents be3dbbe + 4d48184 commit 86c611ab0fcd516f1410b31e620fa60bc6b6dda2 @ddollar ddollar committed Mar 5, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 bin/compile
View
@@ -18,8 +18,6 @@ S3_BUCKET="heroku-buildpack-nodejs"
BUILD_DIR=$1
CACHE_DIR=$2
LP_DIR=`cd $(dirname $0); cd ..; pwd`
-CACHE_STORE_DIR="$CACHE_DIR/node_modules/$NPM_VERSION"
-CACHE_TARGET_DIR="$BUILD_DIR/node_modules"
function error() {
echo " ! $*"
@@ -124,6 +122,10 @@ echo "Using Node.js version: ${NODE_VERSION}" | indent
NPM_VERSION=$(package_resolve_version "npm")
echo "Using npm version: ${NPM_VERSION}" | indent
+# cache directories
+CACHE_STORE_DIR="$CACHE_DIR/node_modules/$NPM_VERSION"
+CACHE_TARGET_DIR="$BUILD_DIR/node_modules"
+
# s3 packages
NODE_PACKAGE="http://${S3_BUCKET}.s3.amazonaws.com/nodejs-${NODE_VERSION}.tgz"
NPM_PACKAGE="http://${S3_BUCKET}.s3.amazonaws.com/npm-${NPM_VERSION}.tgz"

0 comments on commit 86c611a

Please sign in to comment.