mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-18 16:02:10 +00:00
fix(cli): include path in dev URL and use open.default for browser
- Append &path= to the printed/opened URL when --path is specified - Use open.default(url) instead of open.openApp for more reliable browser opening Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -636,11 +636,12 @@ export async function dev(opts: GlobalOptions & SyncOptions & DevOpts) {
|
||||
const port = await getPort.default({ port: PORT });
|
||||
const url =
|
||||
`${workspace.remote}dev?workspace=${workspace.workspaceId}&local=true&wm_token=${workspace.token}` +
|
||||
(port === PORT ? "" : `&port=${port}`);
|
||||
(port === PORT ? "" : `&port=${port}`) +
|
||||
(opts.path ? `&path=${opts.path}` : "");
|
||||
|
||||
console.log(`Go to ${url}`);
|
||||
try {
|
||||
open.openApp(open.apps.browser, { arguments: [url] }).catch((error) => {
|
||||
open.default(url).catch((error) => {
|
||||
console.error(
|
||||
`Failed to open browser, please navigate to ${url}, error: ${error}`
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user