Skip to content

Commit

Permalink
Fix project being a package
Browse files Browse the repository at this point in the history
  • Loading branch information
SBoudrias authored Sep 27, 2024
1 parent fcb9003 commit 87736fe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/valid-project.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { resolve } from 'path'
import { readFileSync } from 'node:fs'
import fail from './fail.js'
import { TshyConfig } from './types.js'

export default (p: any): p is TshyConfig['project'] => {
if (typeof p === 'string') {
try {
readFileSync(resolve(p), 'utf8')
readFileSync(import.meta.resolve(p), 'utf8')
return true
} catch (_) {}
}
Expand Down

0 comments on commit 87736fe

Please sign in to comment.