mirror of
https://github.com/zen-browser/surfer.git
synced 2025-07-07 08:55:33 +02:00
Merge pull request #12 from vraravam/patch-1
Some checks failed
CI / general (push) Has been cancelled
Some checks failed
CI / general (push) Has been cancelled
Update discard.ts to print error message using the real file
This commit is contained in:
commit
0b109c2dd4
1 changed files with 2 additions and 2 deletions
|
@ -10,9 +10,9 @@ import { ENGINE_DIR } from '../constants'
|
|||
export const discard = async (file: string): Promise<void> => {
|
||||
const realFile = resolve(ENGINE_DIR, file)
|
||||
|
||||
log.info(`Discarding ${file}...`)
|
||||
log.info(`Discarding ${realFile}...`)
|
||||
|
||||
if (!existsSync(realFile)) throw new Error(`File ${file} does not exist`)
|
||||
if (!existsSync(realFile)) throw new Error(`File ${realFile} does not exist`)
|
||||
if (!statSync(realFile).isFile()) throw new Error('Target must be a file.')
|
||||
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue