Skip to content

Commit

Permalink
Fixes issue boltpkg#207
Browse files Browse the repository at this point in the history
In certain situations where you have internal workspace dependencies you dont have shims created so calling "readCmdShim" expects to read a shim file. Instead we just create the shim file using the file referenced in "src".
  • Loading branch information
Bloodb0ne authored Jan 6, 2019
1 parent 9ed8920 commit 87c7ff8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/utils/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,15 @@ function stripExtension(filePath: string) {
}

async function cmdShim(src: string, dest: string) {
const currentShimTarget = path.resolve(
path.dirname(src),
await readCmdShim(src)
);
var currentShimTarget = src;
try{
var currentShimTarget = path.resolve(
path.dirname(src),
await readCmdShim(src)
);
}catch(err){

}
await promisify(cb => _cmdShim(currentShimTarget, stripExtension(dest), cb));
}

Expand Down

0 comments on commit 87c7ff8

Please sign in to comment.