mirror of
https://github.com/ION606/browser-chromium.git
synced 2026-05-14 22:26:56 +00:00
16 lines
492 B
JavaScript
16 lines
492 B
JavaScript
import fs from 'fs';
|
|
import { finalTabCleanup } from "./clearCache.js";
|
|
|
|
export async function handleArgs() {
|
|
console.log(process.argv);
|
|
for (const arg of process.argv) {
|
|
console.log(arg);
|
|
if (arg === '--clear-cache') {
|
|
await finalTabCleanup();
|
|
fs.rmSync(`${import.meta.dirname}/cache`, { recursive: true });
|
|
}
|
|
else if (arg === '--no-cache') {
|
|
console.error('TODO: RUN WITH NEW SESSION/PARTITION');
|
|
}
|
|
}
|
|
} |