command in project.scan needs to resolve to the bin, not the lib file

This is because nak was changed to also be run as a regular Node script, not just an executable
This commit is contained in:
Garen Torikian
2013-05-22 00:18:18 -07:00
parent d2e5c55bbf
commit ab466b60c8

View File

@@ -1,3 +1,4 @@
Path = require 'path'
fsUtils = require 'fs-utils'
_ = require 'underscore'
$ = require 'jquery'
@@ -274,7 +275,7 @@ class Project
readPath(line) if state is 'readingPath'
readLine(line) if state is 'readingLines'
command = require.resolve('nak')
command = Path.resolve(require.resolve('nak'), '../../bin/nak')
args = ['--hidden', '--ackmate', regex.source, @getPath()]
ignoredNames = config.get('core.ignoredNames') ? []
args.unshift('--ignore', ignoredNames.join(',')) if ignoredNames.length > 0