@@ -234,7 +234,6 @@ export async function uninstall(arg: string, isGlobal: boolean = false): Promise
234
234
return false
235
235
}
236
236
237
- // eslint-disable-next-line no-console
238
237
console . log ( `🗑️ Uninstalling ${ packageName } (\x1B[3m${ resolvedDomain } \x1B[0m)...` )
239
238
240
239
const removedFiles : Array < { program : string , location : string } > = [ ]
@@ -255,13 +254,12 @@ export async function uninstall(arg: string, isGlobal: boolean = false): Promise
255
254
try {
256
255
await fs . promises . unlink ( binaryPath . string )
257
256
removedFiles . push ( { program, location : binDir . string } )
258
- // eslint-disable-next-line no-console
257
+
259
258
console . log ( ` 🗑️ Removed ${ program } from ${ binDir . string } ` )
260
259
}
261
260
catch ( error ) {
262
261
// Check if it's a permission error
263
262
if ( error instanceof Error && 'code' in error && error . code === 'EACCES' ) {
264
- // eslint-disable-next-line no-console
265
263
console . log ( ` ⚠️ Permission denied: ${ program } in ${ binDir . string } (try with sudo)` )
266
264
}
267
265
else {
@@ -282,9 +280,8 @@ export async function uninstall(arg: string, isGlobal: boolean = false): Promise
282
280
const binaryWord = removedFiles . length === 1 ? 'binary' : 'binaries'
283
281
const packageDisplay = packageName !== resolvedDomain ? `${ packageName } (\x1B[3m${ resolvedDomain } \x1B[0m)` : packageName
284
282
285
- // eslint-disable-next-line no-console
286
283
console . log ( `✅ Successfully uninstalled ${ packageDisplay } ` )
287
- // eslint-disable-next-line no-console
284
+
288
285
console . log ( ` Removed ${ removedFiles . length } ${ binaryWord } :` )
289
286
290
287
// Group by location for cleaner output
@@ -297,23 +294,21 @@ export async function uninstall(arg: string, isGlobal: boolean = false): Promise
297
294
} , { } as Record < string , string [ ] > )
298
295
299
296
for ( const [ location , programs ] of Object . entries ( locationGroups ) ) {
300
- // eslint-disable-next-line no-console
301
297
console . log ( ` • ${ location } : ${ programs . join ( ', ' ) } ` )
302
298
}
303
299
}
304
300
305
301
if ( missingFiles . length > 0 ) {
306
302
const binaryWord = missingFiles . length === 1 ? 'binary was' : 'binaries were'
307
- // eslint-disable-next-line no-console
303
+
308
304
console . log ( `⚠️ ${ missingFiles . length } expected ${ binaryWord } not found: ${ missingFiles . join ( ', ' ) } ` )
309
- // eslint-disable-next-line no-console
305
+
310
306
console . log ( ` (May have been previously removed or installed elsewhere)` )
311
307
}
312
308
313
309
if ( ! foundAnyBinary ) {
314
- // eslint-disable-next-line no-console
315
310
console . log ( `ℹ️ No binaries were found for ${ packageName } - package may not be installed` )
316
- // eslint-disable-next-line no-console
311
+
317
312
console . log ( ` (Checked: ${ binDirectories . map ( d => d . string ) . join ( ', ' ) } )` )
318
313
return false
319
314
}
@@ -330,7 +325,6 @@ export async function uninstall(arg: string, isGlobal: boolean = false): Promise
330
325
* Uninstall all packages and remove the entire installation
331
326
*/
332
327
export async function uninstall_all ( ) : Promise < void > {
333
- // eslint-disable-next-line no-console
334
328
console . log ( '🗑️ Uninstalling all Launchpad packages and data...' )
335
329
336
330
try {
@@ -360,7 +354,7 @@ export async function uninstall_all(): Promise<void> {
360
354
await fs . promises . rm ( dir . string , { recursive : true , force : true } )
361
355
locationRemovedCount ++
362
356
removedCount ++
363
- // eslint-disable-next-line no-console
357
+
364
358
console . log ( ` 🗑️ Removed ${ path . basename ( dir . string ) } directory from ${ root . string } ` )
365
359
}
366
360
}
@@ -371,13 +365,11 @@ export async function uninstall_all(): Promise<void> {
371
365
}
372
366
373
367
if ( removedCount > 0 ) {
374
- // eslint-disable-next-line no-console
375
368
console . log ( `✅ Successfully uninstalled all Launchpad data (${ removedCount } directories removed)` )
376
- // eslint-disable-next-line no-console
369
+
377
370
console . log ( ` Cleaned locations: ${ removedLocations . join ( ', ' ) } ` )
378
371
}
379
372
else {
380
- // eslint-disable-next-line no-console
381
373
console . log ( 'ℹ️ No Launchpad installations found to remove' )
382
374
}
383
375
}
0 commit comments