File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
crates/volta-core/src/project Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ impl Project {
174174 // (project uses Yarn berry if 'yarnrc.yml' exists, uses PnP if '.pnp.js' or '.pnp.cjs' exist)
175175 pub fn needs_yarn_run ( & self ) -> bool {
176176 self . platform ( )
177- . map_or ( false , |platform| platform. yarn . is_some ( ) )
177+ . is_some_and ( |platform| platform. yarn . is_some ( ) )
178178 && self . workspace_roots ( ) . any ( |x| {
179179 x. join ( ".yarnrc.yml" ) . exists ( )
180180 || x. join ( ".pnp.cjs" ) . exists ( )
@@ -251,11 +251,11 @@ fn is_node_root(dir: &Path) -> bool {
251251}
252252
253253fn is_node_modules ( dir : & Path ) -> bool {
254- dir. file_name ( ) . map_or ( false , |tail| tail == "node_modules" )
254+ dir. file_name ( ) . is_some_and ( |tail| tail == "node_modules" )
255255}
256256
257257fn is_dependency ( dir : & Path ) -> bool {
258- dir. parent ( ) . map_or ( false , is_node_modules)
258+ dir. parent ( ) . is_some_and ( is_node_modules)
259259}
260260
261261fn is_project_root ( dir : & Path ) -> bool {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ pub fn main() {
1010 // In order to migrate the existing Volta directory while avoiding unconditional changes to the user's system,
1111 // the Homebrew formula runs volta-migrate with `--no-create` flag in the post-install phase.
1212 let no_create = matches ! ( std:: env:: args_os( ) . nth( 1 ) , Some ( flag) if flag == "--no-create" ) ;
13- if no_create && ! volta_home ( ) . map_or ( false , |home| home. root ( ) . exists ( ) ) {
13+ if no_create && volta_home ( ) . map_or ( true , |home| ! home. root ( ) . exists ( ) ) {
1414 ExitCode :: Success . exit ( ) ;
1515 }
1616
You can’t perform that action at this time.
0 commit comments