Skip to content

Commit

Permalink
handle windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jchip committed Mar 23, 2018
1 parent d1b170a commit c9e4a6b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions xclap.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const Path = require("path");
const yoTest = require("yeoman-test");
const _ = require("lodash");

const isWin32 = process.platform.startsWith("win32");
const packagesDir = Path.join(__dirname, "packages");

const pullLocalPackages = dir => {
Expand Down Expand Up @@ -53,10 +54,12 @@ const runAppTest = (dir, forceLocal) => {
}
};

const fynSetup = isWin32 ? "fyn win --quiet && fynwin" : `eval "$(fyn bash)"`;
const localClap = Path.join("node_modules", ".bin", "clap");
return exec(
{ cwd: dir },
`eval "$(fyn bash)" && fyn --pg simple -q v i && node_modules/.bin/clap ?fix-generator-eslint`
).then(() => exec({ cwd: dir }, `eval "$(fyn bash)" && npm test`));
`${fynSetup} && fyn --pg simple -q v i && ${localClap} ?fix-generator-eslint`
).then(() => exec({ cwd: dir }, `${fynSetup} && npm test`));
};

const testGenerator = (testDir, clean, prompts) => {
Expand Down

0 comments on commit c9e4a6b

Please sign in to comment.