Skip to content

Commit 0db12ca

Browse files
committed
feat: import unlinkSync from fs
1 parent 39f1270 commit 0db12ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/coordination.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { EventEmitter } from 'events'
33
import { Server } from 'http'
44
import express from 'express'
55
import { AddressInfo } from 'net'
6+
import { unlinkSync } from 'fs'
67
import { log, debugLog, DEBUG, setupOAuthCallbackServerWithLongPoll } from './utils'
78

89
export type AuthCoordinator = {
@@ -263,7 +264,7 @@ export async function coordinateAuth(
263264
try {
264265
// Synchronous version for 'exit' event since we can't use async here
265266
const configPath = getConfigFilePath(serverUrlHash, 'lock.json')
266-
require('fs').unlinkSync(configPath)
267+
unlinkSync(configPath)
267268
if (DEBUG) console.error(`[DEBUG] Removed lockfile on exit: ${configPath}`)
268269
} catch (error) {
269270
if (DEBUG) console.error(`[DEBUG] Error removing lockfile on exit:`, error)

0 commit comments

Comments
 (0)