Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wavedash"
version = "0.1.87"
version = "0.1.88"
edition = "2021"
authors = ["Wavedash Team"]
description = "Cross-platform CLI tool for uploading game projects to wavedash.com"
Expand Down
8 changes: 6 additions & 2 deletions src/dev/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async fn create_local_build(

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

pub async fn handle_dev(config_path: Option<PathBuf>, verbose: bool) -> Result<()> {
pub async fn handle_dev(config_path: Option<PathBuf>, verbose: bool, no_open: bool) -> Result<()> {
let auth_manager = AuthManager::new()?;
let api_key = auth_manager
.get_api_key()
Expand Down Expand Up @@ -178,7 +178,11 @@ pub async fn handle_dev(config_path: Option<PathBuf>, verbose: bool) -> Result<(
println!(" callback_uri: {}", callback_uri);
println!(" state: {}", state_token);
}
open::that(&local_url)?;
if no_open {
println!(" --no-open set; open {} in your browser to start.", local_url);
} else {
open::that(&local_url)?;
}

server::run(
listener,
Expand Down
9 changes: 7 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ enum Commands {
help = "Path to wavedash.toml config file"
)]
config: Option<PathBuf>,
#[arg(
long = "no-open",
help = "Don't automatically open the browser; just print the local URL"
)]
no_open: bool,
},
#[command(
about = "Publish an uploaded build to wavedash.com",
Expand Down Expand Up @@ -430,8 +435,8 @@ async fn run() -> Result<()> {
handle_build_push(config, cli.verbose, message).await?;
}
},
Commands::Dev { config } => {
handle_dev(config, cli.verbose).await?;
Commands::Dev { config, no_open } => {
handle_dev(config, cli.verbose, no_open).await?;
}
Commands::Publish {
config,
Expand Down
Loading