Skip to content

Commit

Permalink
chore: add eslint comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Dec 8, 2024
1 parent 676cbbe commit cd13a99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hosts.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { exec, spawn } from 'node:child_process'
import { exec } from 'node:child_process'
import fs from 'node:fs'
import os from 'node:os'
import path from 'node:path'
Expand Down Expand Up @@ -59,6 +59,7 @@ export async function addHosts(hosts: string[], verbose?: boolean): Promise<void
await execSudo(`cp "${tmpFile}" "${hostsFilePath}"`)
log.success(`Added new hosts: ${newEntries.join(', ')}`)
}
// eslint-disable-next-line unused-imports/no-unused-vars
catch (error) {
log.error('Failed to modify hosts file automatically')
log.warn('Please add these entries to your hosts file manually:')
Expand Down Expand Up @@ -119,6 +120,7 @@ export async function removeHosts(hosts: string[], verbose?: boolean): Promise<v
await execSudo(`cp "${tmpFile}" "${hostsFilePath}"`)
log.success('Hosts removed successfully')
}
// eslint-disable-next-line unused-imports/no-unused-vars
catch (error) {
log.error('Failed to modify hosts file automatically')
log.warn('Please remove these entries from your hosts file manually:')
Expand Down

0 comments on commit cd13a99

Please sign in to comment.