@smbcloud / cli / commits / 6ea0fa7

Improve runner detection messages with app type details

Seto Elkahfi committed Jun 29, 2025 at 01:23 UTC 6ea0fa74654eb1f50f6eda17c29492ba6cc22d5e
1 file changed +14 -3
crates/cli/src/project/runner.rs
+14 -3
@@ -34,23 +34,34 @@ pub(crate) async fn detect_runner() -> Result<Runner> {
34 || Path::new("next.config.mjs").exists()
35 || Path::new("astro.config.mjs").exists())
36 {
37 + let app_string = if Path::new("next.config.js").exists()
38 + || Path::new("next.config.ts").exists()
39 + || Path::new("next.config.mjs").exists()
40 + {
41 + "Next.js app"
42 + } else if Path::new("astro.config.mjs").exists() {
43 + "Astro app"
44 + } else {
45 + panic!("Unsupported app.")
46 + };
47 +
48 spinner.stop_and_persist(
49 &succeed_symbol(),
39 - succeed_message("NodeJs 🟩 runner detected"),
50 + succeed_message(format!("NodeJs 🟩 runner with {} detected", app_string).as_str()),
51 );
52 return Ok(Runner::NodeJs);
53 }
54 if Path::new("Gemfile").exists() {
55 spinner.stop_and_persist(
56 &succeed_symbol(),
46 - succeed_message("Ruby 🟥 runner detected"),
57 + succeed_message("Ruby 🟥 runner with Rails app detected"),
58 );
59 return Ok(Runner::Ruby);
60 }
61 if Path::new("Package.swift").exists() {
62 spinner.stop_and_persist(
63 &succeed_symbol(),
53 - succeed_message("Swift 🟧 runner detected"),
64 + succeed_message("Swift 🟧 runner with Vapor app detected"),
65 );
66 return Ok(Runner::Swift);
67 }