fix cli isApp
This commit is contained in:
parent
1e36fa0fa3
commit
fcdb8feea0
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bun
|
#!/usr/bin/env bun
|
||||||
import { APPS_DIR } from '$apps'
|
|
||||||
import type { App, LogLine } from '@types'
|
import type { App, LogLine } from '@types'
|
||||||
import { loadGitignore } from '@gitignore'
|
import { loadGitignore } from '@gitignore'
|
||||||
import { program } from 'commander'
|
import { program } from 'commander'
|
||||||
|
|
@ -295,7 +294,7 @@ async function getApp(name: string) {
|
||||||
|
|
||||||
function isApp(): boolean {
|
function isApp(): boolean {
|
||||||
try {
|
try {
|
||||||
const pkg = JSON.parse(join(process.cwd(), 'package.json'))
|
const pkg = JSON.parse(readFileSync(join(process.cwd(), 'package.json'), 'utf-8'))
|
||||||
return !!pkg?.scripts?.toes
|
return !!pkg?.scripts?.toes
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return false
|
return false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user