Skip to content

Commit

Permalink
fixed install cmd on windows (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
onichandame committed Mar 20, 2020
1 parent 17f7abd commit 125b21c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ export async function gitInit(dest: string) {
export async function nodeInstall(dest: string) {
chdir(dest);

const bin = which.sync('yarnpkg', { nothrow: true });
const cmd = bin ? 'yarnpkg' : 'npm';
const yarn = which.sync('yarnpkg', { nothrow: true });
const npm = which.sync('npm', { nothrow: true });
const cmd = yarn ? yarn : (npm ? npm : 'npm');
await runCommand(cmd, ['install']);
}

0 comments on commit 125b21c

Please sign in to comment.