Skip to content

Commit b99f195

Browse files
committed
chore: wip
1 parent ee4e947 commit b99f195

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

packages/launchpad/src/commands/md5.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable no-console */
2-
import type { Command } from '../cli/types'
32
import type { Buffer } from 'node:buffer'
3+
import type { Command } from '../cli/types'
44

55
const cmd: Command = {
66
name: 'md5',

packages/launchpad/src/uninstall.ts

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ export async function uninstall(arg: string, isGlobal: boolean = false): Promise
234234
return false
235235
}
236236

237-
// eslint-disable-next-line no-console
238237
console.log(`🗑️ Uninstalling ${packageName} (\x1B[3m${resolvedDomain}\x1B[0m)...`)
239238

240239
const removedFiles: Array<{ program: string, location: string }> = []
@@ -255,13 +254,12 @@ export async function uninstall(arg: string, isGlobal: boolean = false): Promise
255254
try {
256255
await fs.promises.unlink(binaryPath.string)
257256
removedFiles.push({ program, location: binDir.string })
258-
// eslint-disable-next-line no-console
257+
259258
console.log(` 🗑️ Removed ${program} from ${binDir.string}`)
260259
}
261260
catch (error) {
262261
// Check if it's a permission error
263262
if (error instanceof Error && 'code' in error && error.code === 'EACCES') {
264-
// eslint-disable-next-line no-console
265263
console.log(` ⚠️ Permission denied: ${program} in ${binDir.string} (try with sudo)`)
266264
}
267265
else {
@@ -282,9 +280,8 @@ export async function uninstall(arg: string, isGlobal: boolean = false): Promise
282280
const binaryWord = removedFiles.length === 1 ? 'binary' : 'binaries'
283281
const packageDisplay = packageName !== resolvedDomain ? `${packageName} (\x1B[3m${resolvedDomain}\x1B[0m)` : packageName
284282

285-
// eslint-disable-next-line no-console
286283
console.log(`✅ Successfully uninstalled ${packageDisplay}`)
287-
// eslint-disable-next-line no-console
284+
288285
console.log(` Removed ${removedFiles.length} ${binaryWord}:`)
289286

290287
// Group by location for cleaner output
@@ -297,23 +294,21 @@ export async function uninstall(arg: string, isGlobal: boolean = false): Promise
297294
}, {} as Record<string, string[]>)
298295

299296
for (const [location, programs] of Object.entries(locationGroups)) {
300-
// eslint-disable-next-line no-console
301297
console.log(` • ${location}: ${programs.join(', ')}`)
302298
}
303299
}
304300

305301
if (missingFiles.length > 0) {
306302
const binaryWord = missingFiles.length === 1 ? 'binary was' : 'binaries were'
307-
// eslint-disable-next-line no-console
303+
308304
console.log(`⚠️ ${missingFiles.length} expected ${binaryWord} not found: ${missingFiles.join(', ')}`)
309-
// eslint-disable-next-line no-console
305+
310306
console.log(` (May have been previously removed or installed elsewhere)`)
311307
}
312308

313309
if (!foundAnyBinary) {
314-
// eslint-disable-next-line no-console
315310
console.log(`ℹ️ No binaries were found for ${packageName} - package may not be installed`)
316-
// eslint-disable-next-line no-console
311+
317312
console.log(` (Checked: ${binDirectories.map(d => d.string).join(', ')})`)
318313
return false
319314
}
@@ -330,7 +325,6 @@ export async function uninstall(arg: string, isGlobal: boolean = false): Promise
330325
* Uninstall all packages and remove the entire installation
331326
*/
332327
export async function uninstall_all(): Promise<void> {
333-
// eslint-disable-next-line no-console
334328
console.log('🗑️ Uninstalling all Launchpad packages and data...')
335329

336330
try {
@@ -360,7 +354,7 @@ export async function uninstall_all(): Promise<void> {
360354
await fs.promises.rm(dir.string, { recursive: true, force: true })
361355
locationRemovedCount++
362356
removedCount++
363-
// eslint-disable-next-line no-console
357+
364358
console.log(` 🗑️ Removed ${path.basename(dir.string)} directory from ${root.string}`)
365359
}
366360
}
@@ -371,13 +365,11 @@ export async function uninstall_all(): Promise<void> {
371365
}
372366

373367
if (removedCount > 0) {
374-
// eslint-disable-next-line no-console
375368
console.log(`✅ Successfully uninstalled all Launchpad data (${removedCount} directories removed)`)
376-
// eslint-disable-next-line no-console
369+
377370
console.log(` Cleaned locations: ${removedLocations.join(', ')}`)
378371
}
379372
else {
380-
// eslint-disable-next-line no-console
381373
console.log('ℹ️ No Launchpad installations found to remove')
382374
}
383375
}

0 commit comments

Comments
 (0)