MCPcopy
hub / github.com/affaan-m/ECC / main

Function main

scripts/repair.js:69–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67}
68
69function main() {
70 try {
71 const options = parseArgs(process.argv);
72 if (options.help) {
73 showHelp(0);
74 }
75
76 const result = repairInstalledStates({
77 repoRoot: require('path').join(__dirname, '..'),
78 homeDir: process.env.HOME || os.homedir(),
79 projectRoot: process.cwd(),
80 targets: options.targets,
81 dryRun: options.dryRun,
82 });
83 const hasErrors = result.summary.errorCount > 0;
84
85 if (options.json) {
86 console.log(JSON.stringify(result, null, 2));
87 } else {
88 printHuman(result);
89 }
90
91 process.exitCode = hasErrors ? 1 : 0;
92 } catch (error) {
93 console.error(`Error: ${error.message}`);
94 process.exit(1);
95 }
96}
97
98main();

Callers 1

repair.jsFile · 0.70

Calls 4

repairInstalledStatesFunction · 0.85
parseArgsFunction · 0.70
showHelpFunction · 0.70
printHumanFunction · 0.70

Tested by

no test coverage detected