revertAllProcesses static method
Attempts to remove the created workspace folder when reverting.
Parameters:
initialDirectory: the directory that was current before scaffolding.projectName: the base project name used to determine the workspace folder.
Throws:
- Exception with message
⚠️ Failed to revert workspace processeson failure.
Implementation
static void revertAllProcesses({
required Directory initialDirectory,
required String projectName,
}) {
try {
Process.runSync(
'rm',
['-rf', '${projectName}_workspaces'],
workingDirectory: initialDirectory.path,
runInShell: true,
);
} catch (_) {
throw Exception('⚠️ Failed to revert workspace processes');
}
}