File tree 2 files changed +13
-3
lines changed
fixtures/without-package-json/packages/.npm
2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,17 @@ pub fn collect_packages(args: &Args) -> Result<PackagesList> {
51
51
52
52
let mut packages_issues: Vec < BoxIssue > = Vec :: new ( ) ;
53
53
54
- let mut add_package =
55
- |packages_issues : & mut Vec < BoxIssue > , path : PathBuf | match Package :: new ( path. clone ( ) ) {
54
+ let mut add_package = |packages_issues : & mut Vec < BoxIssue > , path : PathBuf | {
55
+ // Ignore hidden directories, e.g. `.npm`, `.react-email`
56
+ if let Some ( stem) = path. file_stem ( ) {
57
+ if let Some ( stem) = stem. to_str ( ) {
58
+ if stem. starts_with ( '.' ) {
59
+ return ;
60
+ }
61
+ }
62
+ }
63
+
64
+ match Package :: new ( path. clone ( ) ) {
56
65
Ok ( package) => packages. push ( package) ,
57
66
Err ( error) => {
58
67
if error. to_string ( ) . contains ( "not found" ) {
@@ -64,7 +73,8 @@ pub fn collect_packages(args: &Args) -> Result<PackagesList> {
64
73
std:: process:: exit ( 1 ) ;
65
74
}
66
75
}
67
- } ;
76
+ }
77
+ } ;
68
78
69
79
if let Some ( packages) = & packages_list {
70
80
let packages = packages
You can’t perform that action at this time.
0 commit comments