MCPcopy Create free account
hub / github.com/chhoumann/quickadd / main

Function main

scripts/obsidian-e2e-cli.mjs:178–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

176}
177
178async function main() {
179 const parsed = parseArgs(process.argv.slice(2));
180 if (parsed.help) {
181 printUsage();
182 return;
183 }
184
185 const options = resolveInstanceOptions(parseInstanceArgs(parsed.instanceArgs));
186 // Validate the profile root we own before the reaper scans/removes anything in
187 // it, so a hijacked root aborts the run loudly instead of being trusted.
188 await ensureSecureDir(options.profileRoot);
189 await reapStaleInstances(options);
190 await ensureObsidianInstance(options);
191 process.exitCode = await spawnObsidian(options, parsed.commandArgs);
192}
193
194if (import.meta.url === `file://${process.argv[1]}`) {
195 main().catch((error) => {

Callers 1

Calls 7

parseArgsFunction · 0.90
resolveInstanceOptionsFunction · 0.90
ensureSecureDirFunction · 0.90
reapStaleInstancesFunction · 0.90
ensureObsidianInstanceFunction · 0.85
spawnObsidianFunction · 0.85
printUsageFunction · 0.70

Tested by

no test coverage detected