From 92314e38e316df48aa8be481ca913481a2bf2658 Mon Sep 17 00:00:00 2001 From: "guillem.cordoba" Date: Tue, 30 Apr 2024 17:32:33 +0200 Subject: [PATCH] Added .git to ignore --- crates/file_tree_utils/src/lib.rs | 5 ++++- crates/scaffold_remote_zome/src/bin/main.rs | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/file_tree_utils/src/lib.rs b/crates/file_tree_utils/src/lib.rs index 0f30d2c..b013bd8 100644 --- a/crates/file_tree_utils/src/lib.rs +++ b/crates/file_tree_utils/src/lib.rs @@ -28,7 +28,10 @@ pub type FileTree = FileSystemTree; pub fn load_directory_into_memory(path: &Path) -> Result { let mut file_tree: FileTree = dir! {}; - for result in WalkBuilder::new(path).hidden(false).build() { + let mut builder = WalkBuilder::new(path); + builder.add_ignore(".git/"); + + for result in builder.hidden(false).build() { let dir_entry = result? .path() .iter() diff --git a/crates/scaffold_remote_zome/src/bin/main.rs b/crates/scaffold_remote_zome/src/bin/main.rs index ea567ae..744cd74 100644 --- a/crates/scaffold_remote_zome/src/bin/main.rs +++ b/crates/scaffold_remote_zome/src/bin/main.rs @@ -1,11 +1,11 @@ -use anyhow::{anyhow, Result}; +use anyhow::Result; use build_fs_tree::{Build, MergeableFileSystemTree}; use clap::Parser; use colored::Colorize; use scaffold_remote_zome::scaffold_remote_zome; use std::{ ffi::OsString, - path::{Path, PathBuf}, + path::PathBuf, process::{Command, ExitCode}, }; use sync_npm_git_dependencies_with_nix::synchronize_npm_git_dependencies_with_nix;