@@ -3,6 +3,7 @@ use std::process::Command as ProcessCommand;
33use clap:: { Parser , Subcommand } ;
44
55use crate :: config;
6+ use crate :: status;
67
78#[ derive( Subcommand ) ]
89pub enum Command {
@@ -66,9 +67,9 @@ fn run_install(args: InstallArgs) -> anyhow::Result<()> {
6667 let path = repo_path ( ) ;
6768
6869 if path. exists ( ) {
69- println ! ( "Local Steel Browser runtime already installed." ) ;
70- println ! ( "repo_path: {}" , path. display( ) ) ;
71- println ! ( "repo_url: {repo_url}" ) ;
70+ status ! ( "Local Steel Browser runtime already installed." ) ;
71+ status ! ( "repo_path: {}" , path. display( ) ) ;
72+ status ! ( "repo_url: {repo_url}" ) ;
7273 return Ok ( ( ) ) ;
7374 }
7475
@@ -85,17 +86,17 @@ fn run_install(args: InstallArgs) -> anyhow::Result<()> {
8586 anyhow:: bail!( "Failed to clone repository." ) ;
8687 }
8788
88- println ! ( "Local Steel Browser runtime installed." ) ;
89- println ! ( "repo_path: {}" , path. display( ) ) ;
90- println ! ( "repo_url: {repo_url}" ) ;
89+ status ! ( "Local Steel Browser runtime installed." ) ;
90+ status ! ( "repo_path: {}" , path. display( ) ) ;
91+ status ! ( "repo_url: {repo_url}" ) ;
9192
9293 Ok ( ( ) )
9394}
9495
9596fn run_start ( args : StartArgs ) -> anyhow:: Result < ( ) > {
9697 if args. docker_check {
9798 return if is_docker_running ( ) {
98- println ! ( "Docker is running." ) ;
99+ status ! ( "Docker is running." ) ;
99100 Ok ( ( ) )
100101 } else {
101102 anyhow:: bail!( "Docker is not running." ) ;
@@ -124,9 +125,9 @@ fn run_start(args: StartArgs) -> anyhow::Result<()> {
124125 anyhow:: bail!( "Failed to start local Steel Browser runtime." ) ;
125126 }
126127
127- println ! ( "Local Steel Browser runtime started." ) ;
128- println ! ( "repo_path: {}" , path. display( ) ) ;
129- println ! ( "api_port: {port}" ) ;
128+ status ! ( "Local Steel Browser runtime started." ) ;
129+ status ! ( "repo_path: {}" , path. display( ) ) ;
130+ status ! ( "api_port: {port}" ) ;
130131
131132 Ok ( ( ) )
132133}
@@ -150,8 +151,8 @@ fn run_stop(args: StopArgs) -> anyhow::Result<()> {
150151 anyhow:: bail!( "Failed to stop local Steel Browser runtime." ) ;
151152 }
152153
153- println ! ( "Local Steel Browser runtime stopped." ) ;
154- println ! ( "repo_path: {}" , path. display( ) ) ;
154+ status ! ( "Local Steel Browser runtime stopped." ) ;
155+ status ! ( "repo_path: {}" , path. display( ) ) ;
155156
156157 Ok ( ( ) )
157158}
0 commit comments