Fix issue with glob pattern
This commit is contained in:
@@ -283,6 +283,8 @@ fn build(mode: &Option<String>) -> std::io::Result<()> {
|
||||
|
||||
child.wait()?;
|
||||
|
||||
std::fs::write(format!("target/{}/.build_hash", build_config.name), hash)?;
|
||||
|
||||
let stop = start.elapsed();
|
||||
|
||||
println!(
|
||||
@@ -298,7 +300,7 @@ fn build(mode: &Option<String>) -> std::io::Result<()> {
|
||||
|
||||
fn hash_src_tree() -> std::io::Result<String> {
|
||||
let mut hashes = String::new();
|
||||
for entry in glob("src/").expect("a valid glob pattern") {
|
||||
for entry in glob("src/**/*").expect("a valid glob pattern") {
|
||||
if let Ok(file) = entry {
|
||||
let text = std::fs::read_to_string(file)?;
|
||||
let hash = sha256::digest(text);
|
||||
|
||||
Reference in New Issue
Block a user