gulpjs / liftoff

Launch your command line tool with ease.
MIT License
843 stars 52 forks source link

liftoff throws when running gulp with bats #45

Closed orlin closed 9 years ago

orlin commented 9 years ago

I get this error from travis. It seems to be a linux issue. No problem with the tests.bats on mac os. A cwd problem? I tried run gulp test --cwd "$(pwd)/test" but that didn't help either. Here is a copy of the error:

# command failed with exit status 8
# output: 
# /home/travis/.nvm/v0.10.37/lib/node_modules/gulp/node_modules/liftoff/index.js:171
#       throw new Error(err);
#             ^
# Error: Error: ENOENT, open '${TMP}/3.14.5.9.flags.json'
#     at Liftoff.<anonymous> (/home/travis/.nvm/v0.10.37/lib/node_modules/gulp/node_modules/liftoff/index.js:171:13)
#     at /home/travis/.nvm/v0.10.37/lib/node_modules/gulp/node_modules/liftoff/index.js:146:9
#     at /home/travis/.nvm/v0.10.37/lib/node_modules/gulp/node_modules/v8flags/index.js:29:20
#     at fs.js:956:21
#     at Object.oncomplete (fs.js:108:15)
tkellen commented 9 years ago

What's the output of require('os').tmpdir() on your machine?

tkellen commented 9 years ago

The actual issue is here: https://github.com/tkellen/js-v8flags/blob/master/index.js#L6

As an aside, gulp-npm-test seems like a bad idea in general and I suspect it will be blacklisted.

/cc @contra @sindresorhus @phated

orlin commented 9 years ago

I tried giving it the --gulpfile path and it looks for the flags in /home/orlin/Dev/gulp-npm-test/test/tmp/4.1.0.21.flags.json, which is a little better than $TMP but still wrong.

Why does gulp-npm-test seem like a bad idea? Maybe because of gulp-watch? I also wrote gulp-npm-run - does that one look any better? It simply makes gulp tasks for all the package.json scripts. Haven't tagged either of them as gulpfriendly as I don't know what that means...

orlin commented 9 years ago

On my mac it's /var/folders/sw/9ytz1ffn1mn0cr2hf0jcz2n80000gn/T/, where it's no problem. On my linux box it's /tmp where the error occurs. I can push a test to find out what it's on travis-ci, if it helps to know.

tkellen commented 9 years ago

Could you add a failing test for the v8flags repo?

tkellen commented 9 years ago

I'm going to close this since that is where the actual issue is.