(command, force)
| 40 | }; |
| 41 | |
| 42 | const runProjectRootCommand = (command, force) => { |
| 43 | if (isDryRun && !force) { |
| 44 | console.log(`[Dry Run] Command: ${command}`); |
| 45 | return "[Dry Run] Command executed."; |
| 46 | } else { |
| 47 | try { |
| 48 | const output = execSync(`cd ${PROJECT_ROOT} && ${command}`, { |
| 49 | stdio: "pipe", |
| 50 | }).toString(); |
| 51 | return output; |
| 52 | } catch (error) { |
| 53 | console.error(`Error executing command ${command}`); |
| 54 | console.error(error); |
| 55 | process.exit(1); |
| 56 | } |
| 57 | } |
| 58 | return undefined; |
| 59 | }; |
| 60 | |
| 61 | const checkBranchSync = () => { |
| 62 | if (noSyncCheck) { |
no test coverage detected