Skip to content

Commit bc2d7cd

Browse files
committed
feat: show when there are no build commands in spin.toml
Signed-off-by: Jimii <jimmyimpulse2@gmail.com>
1 parent 232567f commit bc2d7cd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/build/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ use tracing::log;
1212
/// If present, run the build command of each component.
1313
pub async fn build(app: RawAppManifest, src: &Path) -> Result<()> {
1414
let src = src.absolutize()?;
15+
16+
if app.components.iter().all(|c| c.build.is_none()) {
17+
println!("No build command found!");
18+
return Ok(());
19+
}
20+
1521
let results = futures::future::join_all(
1622
app.components
1723
.into_iter()

0 commit comments

Comments
 (0)