Unsure how to use filepath of open window


#1

Hi all,

I’m currently creating a package and attempting to use this library here to do a grep through a selection of files

findInFiles.find(selector, 'js_uncompiled', '.js')
    .then(function(results) {
        for (var result in results) {
            var res = results[result];
            console.log(
                'found "' + res.matches[0] + '" ' + res.count
                + ' times in "' + result + '"'
            );
        }
    });

the problem is the wrong path is being resolved by the package


#2

Ok so apparantly hitting enter twice manager to post and I can’t see an option to edit?..

Carrying on from the previous post

The path is resolved to this i

index.js:14 Unhandled promise rejection Promise with error: Error: ENOENT: no such file or directory, lstat ‘C:\Users\Thomas Yeoman\AppData\Local\atom\app-1.15.0\js_uncompiled’(…)

I’ve tried tracing through the packages to see if I can just change the paths the packages are using, but it seems to go all the way back to fss.lstat which I have no control over…

Am I missing an obvious way to use a correct path when trying to resolve that directory?

Thanks!