remove hazardous legacy scripts and gate repository writes
This commit is contained in:
@@ -12,11 +12,19 @@ const args = process.argv.slice(2);
|
||||
const positional = args.filter((arg) => !arg.startsWith("--"));
|
||||
const target = resolve(positional[0] ?? process.cwd());
|
||||
const flags = new Set(args.filter((arg) => arg.startsWith("--")));
|
||||
const install = flags.has("--install");
|
||||
const force = flags.has("--force");
|
||||
const withShowcase = flags.has("--with-showcase");
|
||||
const withManaged = flags.has("--with-managed-service");
|
||||
const runChecks = flags.has("--check");
|
||||
|
||||
if (!install) {
|
||||
console.log(
|
||||
"Dry run: captcha installation would update the target repository. Re-run with --install to apply it.",
|
||||
);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
async function exists(path) {
|
||||
try {
|
||||
await stat(path);
|
||||
|
||||
Reference in New Issue
Block a user