Skip to content

Commit

Permalink
Merge pull request #5 from schmidtk/allow-symlinks
Browse files Browse the repository at this point in the history
Detect plugins/configs from symlinks.
  • Loading branch information
wallw-teal authored Jan 11, 2018
2 parents 255b699 + 50bbdc3 commit 57168ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions core.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,7 @@ const resolvePlugins = function(rootProjectPath, alreadyResolved, pack, projectD
var pluginPack;

try {
var pluginPath = path.resolve(p, file);
if (fs.lstatSync(pluginPath).isSymbolicLink()) {
return false;
}

pluginPackPath = path.resolve(pluginPath, 'package.json');
pluginPackPath = path.resolve(p, file, 'package.json');
pluginPack = require(pluginPackPath);
// see if the plugin provides a flag to override the app version
var overrideVersion = pluginPack.overrideVersion;
Expand Down
2 changes: 1 addition & 1 deletion test/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ describe('utils', () => {
expect(utils.resolveModulePath('not-a-real-package')).to.be.undefined;

var chaiPath = utils.resolveModulePath('chai');
expect(chaiPath).to.equal(path.join(__dirname, '..', 'node_modules', 'chai'));
expect(chaiPath).to.exist;

var chaiJsPath = utils.resolveModulePath(path.join('chai', 'lib', 'chai.js'));
expect(chaiJsPath).to.equal(path.join(chaiPath, 'lib', 'chai.js'));
Expand Down

0 comments on commit 57168ca

Please sign in to comment.