Skip to content

Commit

Permalink
fix(cli): create output dir befor writing files into it
Browse files Browse the repository at this point in the history
  • Loading branch information
arlac77 committed Dec 13, 2018
1 parent 65162c6 commit 4507065
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/npm-pkgbuild-cli.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ program
.action(async (args, options, logger) => {
if (options.w !== undefined) {
const wd = options.w;
const dest = createWriteStream(join(wd, "PKGBUILD"));
await promises.mkdir(wd, { recursive: true });

const dest = createWriteStream(join(wd, "PKGBUILD"));

await npm2pkgbuild(process.cwd(), dest);

const r = await execa("makepkg", ["-f"], { cwd: wd });
Expand Down

0 comments on commit 4507065

Please sign in to comment.