MCPcopy Index your code
hub / github.com/anomalyco/opencode / collectRemovalTargets

Function collectRemovalTargets

packages/opencode/src/cli/cmd/uninstall.ts:90–102  ·  view source on GitHub ↗
(args: UninstallArgs, method: Installation.Method)

Source from the content-addressed store, hash-verified

88}
89
90async function collectRemovalTargets(args: UninstallArgs, method: Installation.Method): Promise<RemovalTargets> {
91 const directories: RemovalTargets["directories"] = [
92 { path: Global.Path.data, label: "Data", keep: args.keepData },
93 { path: Global.Path.cache, label: "Cache", keep: false },
94 { path: Global.Path.config, label: "Config", keep: args.keepConfig },
95 { path: Global.Path.state, label: "State", keep: false },
96 ]
97
98 const shellConfig = method === "curl" ? await getShellConfigFile() : null
99 const binary = method === "curl" ? process.execPath : null
100
101 return { directories, shellConfig, binary }
102}
103
104async function showRemovalSummary(targets: RemovalTargets, method: Installation.Method) {
105 prompts.log.message("The following will be removed:")

Callers 1

uninstall.tsFile · 0.85

Calls 1

getShellConfigFileFunction · 0.85

Tested by

no test coverage detected