fix cli isApp

This commit is contained in:
Chris Wanstrath 2026-01-29 15:22:39 -08:00
parent 1e36fa0fa3
commit fcdb8feea0

View File

@ -1,5 +1,4 @@
#!/usr/bin/env bun
import { APPS_DIR } from '$apps'
import type { App, LogLine } from '@types'
import { loadGitignore } from '@gitignore'
import { program } from 'commander'
@ -295,7 +294,7 @@ async function getApp(name: string) {
function isApp(): boolean {
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
} catch (e) {
return false