From 364964ea0a1bf0a5b5ca612e2ee8be10bbdf8db2 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 25 Oct 2017 10:34:43 -0600 Subject: [PATCH] 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()`. --- spec/spec-helper.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/spec-helper.coffee b/spec/spec-helper.coffee index c20bfc827..7621f9cae 100644 --- a/spec/spec-helper.coffee +++ b/spec/spec-helper.coffee @@ -58,7 +58,7 @@ if specPackagePath = FindParentDir.sync(testPaths[0], 'package.json') if specDirectory = FindParentDir.sync(testPaths[0], 'fixtures') specProjectPath = path.join(specDirectory, 'fixtures') else - specProjectPath = path.join(__dirname, 'fixtures') + specProjectPath = require('os').tmpdir() beforeEach -> atom.project.setPaths([specProjectPath])