Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Cat npm-debug.log on exit #34

Merged
merged 1 commit into from

2 participants

@ryanbrainard

This was a quick change I made in response to a user trying to get to the NPM debug output. It might need some work to improve how its stylized, but seems like it would be generally helpful to have in the default buildpack. Here's the related Stackoverflow question that prompted this:

http://stackoverflow.com/questions/15560037/heroku-troubleshooting-npm-errors-during-deploy-reading-a-tmp-file

@zeke
brainard cat-npm-debug-log $ heroku build -b ddollar/test
Checking for app files to sync... done, 0 files needed
Launching build process... done 
Preparing app for compilation... done 
Fetching buildpack... done 
Detecting buildpack... done, Test 
Fetching cache... done 
Compiling app... 
  Running bin/test
    testDetectWithPackageJson
    testDetectWithoutPackageJson
    testPackageJsonWithVersion
    testPackageJsonWithoutVersion
    testPackageJsonWithInvalidVersion
    testNothingCached
    testProfileCreated

    Ran 7 tests.

    OK
Writing .profile.d/buildpack.sh... done 
Putting cache... done 
Creating slug... done 
Uploading slug... done 
Success, slug is https://api.anvilworks.org/slugs/fc5a9fc7-4e29-41fa-9016-dd443b5f628f.tgz 
@zeke zeke merged commit 06f629c into heroku:master
@searls searls referenced this pull request in linemanjs/heroku-buildpack-lineman
Merged

Cache node_modules #8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 22, 2013
  1. @ryanbrainard

    cat npm-debug.log on exit

    ryanbrainard authored
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 0 deletions.
  1. +8 −0 bin/compile
View
8 bin/compile
@@ -101,6 +101,14 @@ function package_download() {
curl $package -s -o - | tar xzf - -C $location
}
+function cat_npm_debug_log() {
+ if [ -f $BUILD_DIR/npm-debug.log ]; then
+ cat $BUILD_DIR/npm-debug.log
+ fi
+}
+
+trap cat_npm_debug_log EXIT
+
bootstrap_node=$(mktmpdir bootstrap_node)
package_download "nodejs" "0.4.7" $bootstrap_node
Something went wrong with that request. Please try again.