Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function nodeReset({ verbose, v1 }: TOptions) {
try {
if (!v1) {
throw new ConditionsNotMetError(
'Currently `node reset` works only with the --v1 param'
);
}
assertV1Dir();
const reset = await confirm({
message: 'This will remove all the data. Are you sure?',
});
if (reset) {
await execCmd(
'rm',
['-Rf', 'data/pg'],
"Couldn't remove the v1 data dir",
null,
verbose
);
}
} catch (err) {
handleCLIError(err);
}
}