Skip to content

Commit

Permalink
Emit warning when asked to build a virtual proj (#1227)
Browse files Browse the repository at this point in the history
  • Loading branch information
nazq authored Jul 13, 2024
1 parent d3a8440 commit f742c95
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rye/src/cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ pub fn execute(cmd: Args) -> Result<(), Error> {
let use_uv = Config::current().use_uv();
let projects = locate_projects(project, cmd.all, &cmd.package[..])?;

let all_virtual = projects.iter().all(|p| p.is_virtual());
if all_virtual {
warn!("skipping build, all projects are virtual");
return Ok(());
}
for project in projects {
// skip over virtual packages on build
if project.is_virtual() {
Expand Down Expand Up @@ -118,6 +123,5 @@ pub fn execute(cmd: Args) -> Result<(), Error> {
bail!("failed to build dist");
}
}

Ok(())
}

0 comments on commit f742c95

Please sign in to comment.