Problem
Running a read command such as eql status in a project without a stash.config.ts prints a hand-written-file instruction and cancels, but does not offer to scaffold the config or point at the commands that would:
$ npx stash eql status
┌ npx stash eql status
│
Error: Could not find stash.config.ts
Create a stash.config.ts file in your project root:
import { defineConfig, resolveDatabaseUrl } from 'stash'
export default defineConfig({
databaseUrl: await resolveDatabaseUrl(),
})
■ Canceled
The message is a dead end: it tells you to hand-write a file, but never mentions stash init (full setup) or stash eql install (which does scaffold a config for you).
Root cause
loadStashConfig() in packages/cli/src/config/index.ts (the missing-config branch, ~line 98) prints a static "create it yourself" message and process.exit(1). Unlike eql install, it does not call ensureStashConfig() nor reference the setup commands.
Suggested fix
Make the missing-config message actionable and runner-aware — recommend stash init / stash eql install before the hand-written fallback. (Keeping it non-interactive for read commands is fine; the key is pointing at the commands that set things up.)
Related
Sibling issue: standalone eql install scaffolds a config that then fails to load. A fix PR will address both.
Problem
Running a read command such as
eql statusin a project without astash.config.tsprints a hand-written-file instruction and cancels, but does not offer to scaffold the config or point at the commands that would:The message is a dead end: it tells you to hand-write a file, but never mentions
stash init(full setup) orstash eql install(which does scaffold a config for you).Root cause
loadStashConfig()inpackages/cli/src/config/index.ts(the missing-config branch, ~line 98) prints a static "create it yourself" message andprocess.exit(1). Unlikeeql install, it does not callensureStashConfig()nor reference the setup commands.Suggested fix
Make the missing-config message actionable and runner-aware — recommend
stash init/stash eql installbefore the hand-written fallback. (Keeping it non-interactive for read commands is fine; the key is pointing at the commands that set things up.)Related
Sibling issue: standalone
eql installscaffolds a config that then fails to load. A fix PR will address both.