trunk-rs/trunk

trunk serve --open opens the page anyways on error

Aperta

#946 aperta il 15 feb 2025

 (2 commenti) (0 reazioni) (0 assegnatari)Rust (315 fork)auto 404
good first issuehelp wanted

Metriche repository

Star
 (4347 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

In case of address already in use for example:

╰─ trunk serve --open
2025-02-15T02:48:23.064899Z  INFO 🚀 Starting trunk 0.21.7
2025-02-15T02:48:23.926930Z  INFO 📦 starting build
   Compiling proc-macro2 v1.0.86
   ....
   Compiling todomvc v0.1.0 (/home/maa/Projects/yew/examples/todomvc)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 17.52s
2025-02-15T02:48:42.232224Z  INFO applying new distribution
2025-02-15T02:48:42.232419Z  INFO ✅ success
2025-02-15T02:48:42.232495Z  INFO 📡 serving static assets at -> /
2025-02-15T02:48:42.232645Z  INFO 📡 server listening at:
2025-02-15T02:48:42.232652Z  INFO     🏠 http://127.0.0.1:8080/
2025-02-15T02:48:42.232655Z  INFO     🏠 http://[::1]:8080/
2025-02-15T02:48:42.232835Z  INFO     🏠 http://localhost.:8080/
2025-02-15T02:48:42.245691Z ERROR error from server task error=Address already in use (os error 98)
2025-02-15T02:48:42.245730Z ERROR Address already in use (os error 98)

It exits with non-zero exit code and opens http://127.0.0.1:8080/ in the browser anyways

Guida contributor