Skip to content

Commit

Permalink
Fix: task lookup error
Browse files Browse the repository at this point in the history
  • Loading branch information
martonsagi committed Nov 1, 2016
1 parent d090713 commit 2242143
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/import-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,13 @@ module.exports = class {
// If file is missing, aborting importation process by throwing an Error
try {
// by default, search in installed package directory
let pkgName = this.engine.options.pkg;
let pkgName = this.cliParams.pkg;
pkgName = pkgName.indexOf('@') !== -1 ? pkgName.split('@')[0] : pkgName;
source = path.resolve(__dirname, `../../${pkgName}/install/${taskName}`);
console.log(source);
fs.copySync(`${source}.js`, destFile);
} catch (e) {
console.log(e);
// fallback to 'tasks' folder in aurelia-cli-pacman
source = path.resolve(__dirname, `../tasks/${taskName}`);
fs.copySync(`${source}.js`, destFile);
Expand Down

0 comments on commit 2242143

Please sign in to comment.