Skip to content

Commit 2cd5873

Browse files
franzwarningclaude
andcommitted
WVDSH-1650: add --no-open flag to wavedash dev
Add a --no-open flag to 'wavedash dev' that skips automatically opening the browser and instead prints the local URL for the user to open manually. Bump version to 0.1.88. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 8134717 commit 2cd5873

4 files changed

Lines changed: 15 additions & 6 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wavedash"
3-
version = "0.1.87"
3+
version = "0.1.88"
44
edition = "2021"
55
authors = ["Wavedash Team"]
66
description = "Cross-platform CLI tool for uploading game projects to wavedash.com"

src/dev/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async fn create_local_build(
5454

5555
const DEFAULT_CONFIG: &str = "./wavedash.toml";
5656

57-
pub async fn handle_dev(config_path: Option<PathBuf>, verbose: bool) -> Result<()> {
57+
pub async fn handle_dev(config_path: Option<PathBuf>, verbose: bool, no_open: bool) -> Result<()> {
5858
let auth_manager = AuthManager::new()?;
5959
let api_key = auth_manager
6060
.get_api_key()
@@ -178,7 +178,11 @@ pub async fn handle_dev(config_path: Option<PathBuf>, verbose: bool) -> Result<(
178178
println!(" callback_uri: {}", callback_uri);
179179
println!(" state: {}", state_token);
180180
}
181-
open::that(&local_url)?;
181+
if no_open {
182+
println!(" --no-open set; open {} in your browser to start.", local_url);
183+
} else {
184+
open::that(&local_url)?;
185+
}
182186

183187
server::run(
184188
listener,

src/main.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ enum Commands {
7474
help = "Path to wavedash.toml config file"
7575
)]
7676
config: Option<PathBuf>,
77+
#[arg(
78+
long = "no-open",
79+
help = "Don't automatically open the browser; just print the local URL"
80+
)]
81+
no_open: bool,
7782
},
7883
#[command(
7984
about = "Publish an uploaded build to wavedash.com",
@@ -430,8 +435,8 @@ async fn run() -> Result<()> {
430435
handle_build_push(config, cli.verbose, message).await?;
431436
}
432437
},
433-
Commands::Dev { config } => {
434-
handle_dev(config, cli.verbose).await?;
438+
Commands::Dev { config, no_open } => {
439+
handle_dev(config, cli.verbose, no_open).await?;
435440
}
436441
Commands::Publish {
437442
config,

0 commit comments

Comments
 (0)