mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-10 00:05:27 +00:00
fix(cli): wmill dev --no-browser was a no-op
Cliffy's `.option("--no-browser", ...)` creates an option named
`browser` (boolean, default undefined) that becomes `false` when the
flag is passed. The previous code checked `opts.noBrowser`, which
Cliffy never populates, so the guard silently no-op'd and the browser
always opened. Rename to `browser` and check `=== false` explicitly,
matching the `wmill app dev --no-open` convention.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
201c05ebff
commit
e40a25df9c
@@ -186,7 +186,7 @@ async function listWorkspacePaths(): Promise<WmPathItem[]> {
|
||||
export interface DevOpts {
|
||||
proxyPort?: number;
|
||||
path?: string;
|
||||
noBrowser?: boolean;
|
||||
browser?: boolean;
|
||||
}
|
||||
|
||||
export async function dev(opts: GlobalOptions & SyncOptions & DevOpts) {
|
||||
@@ -614,7 +614,7 @@ export async function dev(opts: GlobalOptions & SyncOptions & DevOpts) {
|
||||
}
|
||||
|
||||
function maybeOpenBrowser(url: string) {
|
||||
if (opts.noBrowser) return;
|
||||
if (opts.browser === false) return;
|
||||
try {
|
||||
open.default(url).catch((error) => {
|
||||
console.error(
|
||||
|
||||
Reference in New Issue
Block a user