Skip to content

Commit

Permalink
$ to execCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
Aslemammad committed Nov 21, 2023
1 parent 65c1880 commit b7878d9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions script/migrate-test-e2e.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import chalk from "chalk";
import fs from "fs/promises";
import { $, execaCommand } from "execa";
import fs from "fs/promises";

import packageData from "../package.json" assert { type: "json" };

Expand All @@ -13,16 +13,16 @@ import { createRootFiles } from "../lib/steps/writing/creation/rootFiles.js";

const args = {
"--base": ["base", "everything"],
"--mode": ["mode", "migrate"],
"--description": ["description", description],
"--email-github": ["", emailGithub],
"--email-npm": ["", emailNpm],
"--mode": ["mode", "migrate"],
"--owner": ["owner", owner],
"--title": ["title", title],
"--repository": ["repository", repository],
"--skip-all-contributors-api": ["skipAllContributorsApi", ""],
"--skip-github-api": ["skipGitHubApi", ""],
"--skip-install": ["skipInstall", ""],
"--title": ["title", title],
};

const argsStr = Object.entries(args)
Expand All @@ -42,9 +42,10 @@ const rootFiles = await createRootFiles({
...argsObj,
});

await $({
stdio: "inherit",
})`c8 -o ./coverage-migrate -r html -r lcov --src src node ./bin/index.js ${argsStr}`;
await execaCommand(
`c8 -o ./coverage-migrate -r html -r lcov --src src node ./bin/index.js ${argsStr}`,
{ stdio: "inherit" },
);

const { stdout: gitStatus } = await $`git status`;
console.log(`Stdout from running \`git status\`:\n${gitStatus}`);
Expand Down

0 comments on commit b7878d9

Please sign in to comment.