Skip to content

Commit f467423

Browse files
quaesitor-scientiamRichard Wheelerclaude
authored
cmd/tools/vsqlite: route dot commands from CLI args to dot_cmd (#26801)
When a dot command like '.tables' was passed as a CLI argument (e.g. v sqlite mydb.db .tables), it was sent to app.run() which only handles SQL, causing an exec_none error. Route any arg starting with '.' to app.dot_cmd() instead. Co-authored-by: Richard Wheeler <quaesitor.scientiam@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent da858a9 commit f467423

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

cmd/tools/vsqlite/main.v

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,12 @@ fn main() {
122122
}
123123
app.exec_file(args[2])
124124
} else {
125-
app.run(args[1..].join(' '))
125+
cmd := args[1..].join(' ')
126+
if cmd.starts_with('.') {
127+
app.dot_cmd(cmd)
128+
} else {
129+
app.run(cmd)
130+
}
126131
}
127132
}
128133

0 commit comments

Comments
 (0)