feat: display command output to the parent output

This commit is contained in:
Alfi Maulana 2024-08-05 23:48:20 +07:00
parent 8c8ec652f2
commit 4df25a0a61
No known key found for this signature in database
GPG Key ID: 2242A64C2A8DF5A4
3 changed files with 10 additions and 4 deletions

6
dist/index.js generated vendored
View File

@ -26730,7 +26730,7 @@ function configureProject(inputs) {
}
configureArgs.push(...inputs.options.map((opt) => "-D" + opt));
configureArgs.push(...inputs.args);
(0,external_node_child_process_namespaceObject.execFileSync)("cmake", configureArgs);
(0,external_node_child_process_namespaceObject.execFileSync)("cmake", configureArgs, { stdio: "inherit" });
}
/**
* Build a CMake project.
@ -26738,7 +26738,9 @@ function configureProject(inputs) {
* @param inputs - The action inputs.
*/
function buildProject(inputs) {
(0,external_node_child_process_namespaceObject.execFileSync)("cmake", ["--build", inputs.buildDir, ...inputs.buildArgs]);
(0,external_node_child_process_namespaceObject.execFileSync)("cmake", ["--build", inputs.buildDir, ...inputs.buildArgs], {
stdio: "inherit",
});
}
;// CONCATENATED MODULE: external "node:path"

View File

@ -125,6 +125,7 @@ describe("configure a CMake project", () => {
expect(execFileSync).toHaveBeenLastCalledWith(
"cmake",
testCase.expectedArgs,
{ stdio: "inherit" },
);
});
}
@ -169,6 +170,7 @@ describe("build a CMake project", () => {
expect(execFileSync).toHaveBeenLastCalledWith(
"cmake",
testCase.expectedArgs,
{ stdio: "inherit" },
);
});
}

View File

@ -38,7 +38,7 @@ export function configureProject(inputs: Inputs): void {
configureArgs.push(...inputs.options.map((opt) => "-D" + opt));
configureArgs.push(...inputs.args);
execFileSync("cmake", configureArgs);
execFileSync("cmake", configureArgs, { stdio: "inherit" });
}
/**
@ -47,5 +47,7 @@ export function configureProject(inputs: Inputs): void {
* @param inputs - The action inputs.
*/
export function buildProject(inputs: Inputs): void {
execFileSync("cmake", ["--build", inputs.buildDir, ...inputs.buildArgs]);
execFileSync("cmake", ["--build", inputs.buildDir, ...inputs.buildArgs], {
stdio: "inherit",
});
}