mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Undo move of files to safe-chain
This commit is contained in:
parent
b29bc2e6dc
commit
8fe228c476
68 changed files with 7 additions and 10 deletions
17
src/packagemanager/yarn/runYarnCommand.js
Normal file
17
src/packagemanager/yarn/runYarnCommand.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { execSync } from "child_process";
|
||||
import { ui } from "../../environment/userInteraction.js";
|
||||
|
||||
export function runYarnCommand(args) {
|
||||
try {
|
||||
const npxCommand = `yarn ${args.join(" ")}`;
|
||||
execSync(npxCommand, { stdio: "inherit" });
|
||||
} catch (error) {
|
||||
if (error.status) {
|
||||
return { status: error.status };
|
||||
} else {
|
||||
ui.writeError("Error executing command:", error.message);
|
||||
return { status: 1 };
|
||||
}
|
||||
}
|
||||
return { status: 0 };
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue