Skip to content

Commit e61c85d

Browse files
committed
oops formatting was messed up
1 parent 7dfaafa commit e61c85d

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

crates/volta-core/src/project/mod.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,11 @@ impl Project {
174174
/// Does this project use Yarn Plug'n'Play?
175175
// (project uses Yarn, and either of the files '.pnp.js' or '.pnp.cjs' exist)
176176
pub fn is_yarn_pnp(&self) -> bool {
177-
self.platform().map_or(false, |platform| platform.yarn.is_some()) &&
178-
self.manifest_file.parent().map_or(false, |base_dir| {
179-
base_dir.join(".pnp.js").exists() || base_dir.join(".pnp.cjs").exists()
180-
})
177+
self.platform()
178+
.map_or(false, |platform| platform.yarn.is_some())
179+
&& self.manifest_file.parent().map_or(false, |base_dir| {
180+
base_dir.join(".pnp.js").exists() || base_dir.join(".pnp.cjs").exists()
181+
})
181182
}
182183

183184
/// Pins the Node version in this project's manifest file

crates/volta-core/src/run/binary.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,25 @@ pub(super) fn command(exe: &OsStr, args: &[OsString], session: &mut Session) ->
3232
ToolKind::ProjectLocalBinary(bin),
3333
)
3434
.into());
35-
},
35+
}
3636
None => {
37-
if project.is_yarn_pnp()
38-
{
37+
if project.is_yarn_pnp() {
3938
debug!("Project uses Yarn PnP, calling {} with 'yarn'", bin);
4039
let platform = Platform::current(session)?;
4140
let mut exe_and_args = vec![exe.to_os_string()];
4241
exe_and_args.extend_from_slice(args);
43-
return Ok(ToolCommand::new("yarn", exe_and_args, platform, ToolKind::Yarn).into());
42+
return Ok(ToolCommand::new(
43+
"yarn",
44+
exe_and_args,
45+
platform,
46+
ToolKind::Yarn,
47+
)
48+
.into());
4449
} else {
4550
return Err(ErrorKind::ProjectLocalBinaryNotFound {
4651
command: exe.to_string_lossy().to_string(),
47-
}.into());
52+
}
53+
.into());
4854
}
4955
}
5056
}

0 commit comments

Comments
 (0)