Include hidden files when running nak

This commit is contained in:
Kevin Sawicki
2013-04-12 11:47:11 -07:00
parent 26638980bf
commit 7b42e975fb
3 changed files with 18 additions and 1 deletions

View File

@@ -284,6 +284,22 @@ describe "Project", ->
expect(paths.length).toBe 0
expect(matches.length).toBe 0
it "includes files and folders that begin with a '.'", ->
projectPath = '/tmp/atom-tests/folder-with-dot-file'
filePath = fsUtils.join(projectPath, '.text')
fsUtils.write(filePath, 'match this')
project.setPath(projectPath)
paths = []
matches = []
waitsForPromise ->
project.scan /match this/, ({path, match, range}) ->
paths.push(path)
matches.push(match)
runs ->
expect(paths.length).toBe 1
expect(paths[0]).toBe filePath
expect(matches.length).toBe 1
describe "serialization", ->
it "restores the project path", ->

View File

@@ -196,7 +196,7 @@ class Project
readLine(line) if state is 'readingLines'
command = require.resolve('nak')
args = ['--ackmate', regex.source, @getPath()]
args = ['--hidden', '--ackmate', regex.source, @getPath()]
args.unshift("--addVCSIgnores") if config.get('core.excludeVcsIgnoredPaths')
new BufferedProcess({command, args, stdout, exit})
deferred

View File

@@ -15,6 +15,7 @@ class LoadPathsTask
args.unshift('--addVCSIgnores') if config.get('core.excludeVcsIgnoredPaths')
args.unshift('--ignore', ignoredNames.join(',')) if ignoredNames.length > 0
args.unshift('--follow')
args.unshift('--hidden')
paths = []
exit = (code) =>