Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
missingdays committed Oct 10, 2024
1 parent e91b105 commit 4ffa59b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
18 changes: 15 additions & 3 deletions pilota-build/src/codegen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,21 @@ where
file.flush().unwrap();
fmt_file(full_path);

stream.push_str(
format!("include!(\"{}\");\n", file_name).as_str(),
);
match &*this.mode {
Mode::Workspace(_) => {
stream.push_str(
format!("include!(\"{}\");\n", file_name).as_str(),
);
},

Mode::SingleFile { .. } => {
let base_dir_local_path = base_dir.iter().last().unwrap().to_str().unwrap();

stream.push_str(
format!("include!(\"{}/{}\");\n", base_dir_local_path, file_name).as_str(),
);
}
}
} else {
this.write_item(&mut stream, *def_id, &mut dup)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[workspace]
members = [
"article",
"author",
"author", "common",
"image",
]

Expand Down

0 comments on commit 4ffa59b

Please sign in to comment.