diff options
Diffstat (limited to 'planetwars-cli/src/commands/serve.rs')
-rw-r--r-- | planetwars-cli/src/commands/serve.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/planetwars-cli/src/commands/serve.rs b/planetwars-cli/src/commands/serve.rs index a078c83..aa8d149 100644 --- a/planetwars-cli/src/commands/serve.rs +++ b/planetwars-cli/src/commands/serve.rs @@ -1,18 +1,17 @@ -use std::env; use std::io; use clap::Parser; use crate::web; +use crate::workspace::Workspace; #[derive(Parser)] pub struct ServeCommand; impl ServeCommand { pub async fn run(self) -> io::Result<()> { - let workspace_root = env::current_dir().unwrap(); - - web::run(workspace_root).await; + let workspace = Workspace::open_current_dir()?; + web::run(workspace).await; Ok(()) } } |