Skip to content

Commit 364964e

Browse files
author
Nathan Sobo
committed
Always assign a project path outside of bundle for legacy package specs
This prevents package specs that don't have a fixtures directory from attempting to read files out of a non-existent directory inside the ASAR bundle, which causes ENOTDIR errors in superstring. If the spec does not have a parent folder containing a fixtures directory, we now set the default project path to `os.tmpdir()`.
1 parent 622589f commit 364964e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/spec-helper.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ if specPackagePath = FindParentDir.sync(testPaths[0], 'package.json')
5858
if specDirectory = FindParentDir.sync(testPaths[0], 'fixtures')
5959
specProjectPath = path.join(specDirectory, 'fixtures')
6060
else
61-
specProjectPath = path.join(__dirname, 'fixtures')
61+
specProjectPath = require('os').tmpdir()
6262

6363
beforeEach ->
6464
atom.project.setPaths([specProjectPath])

0 commit comments

Comments
 (0)