spawn in shell in local scripts

This commit is contained in:
Joseph Garrone 2024-06-15 01:06:06 +02:00
parent b52dc74d9b
commit 0620d29880
3 changed files with 15 additions and 9 deletions

View File

@ -11,13 +11,17 @@ import { is } from "tsafe/is";
{
const dCompleted = new Deferred<void>();
const child = child_process.spawn("docker", [
...["exec", containerName],
...["/opt/keycloak/bin/kc.sh", "export"],
...["--dir", "/tmp"],
...["--realm", "myrealm"],
...["--users", "realm_file"]
]);
const child = child_process.spawn(
"docker",
[
...["exec", containerName],
...["/opt/keycloak/bin/kc.sh", "export"],
...["--dir", "/tmp"],
...["--realm", "myrealm"],
...["--users", "realm_file"]
],
{ shell: true }
);
let output = "";

View File

@ -13,7 +13,9 @@ run(`node ${join("dist", "bin", "main.js")} copy-keycloak-resources-to-public`,
});
{
const child = child_process.spawn("npx", ["start-storybook", "-p", "6006"]);
const child = child_process.spawn("npx", ["start-storybook", "-p", "6006"], {
shell: true
});
child.stdout.on("data", data => process.stdout.write(data));

View File

@ -13,7 +13,7 @@ export function startRebuildOnSrcChange() {
const dCompleted = new Deferred<void>();
const child = child_process.spawn("yarn", ["build"]);
const child = child_process.spawn("yarn", ["build"], { shell: true });
child.stdout.on("data", data => process.stdout.write(data));