MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / resolveLockTarget

Method resolveLockTarget

packages/oauth/src/oauth-manager.ts:182–187  ·  view source on GitHub ↗

* Resolve the sentinel target file `proper-lockfile` locks against. * `proper-lockfile.lock(target)` creates `${target}.lock` as the * actual lock directory, so the real lockfile on disk ends up at * `{configDir}/oauth/{providerName}.lock`. Returns `undefined` when * locking is opted out

()

Source from the content-addressed store, hash-verified

180 * locking is opted out (no configDir, Windows, env kill switch).
181 */
182 private resolveLockTarget(): string | undefined {
183 if (process.platform === 'win32') return undefined;
184 if (process.env['KIMI_DISABLE_OAUTH_LOCK'] === '1') return undefined;
185 if (this.configDir === undefined) return undefined;
186 return `${this.configDir}/oauth/${this.config.name}`;
187 }
188
189 /**
190 * Acquire the cross-process lock around the refresh critical section.

Callers 1

acquireRefreshLockMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected