Skip to content

Commit b75e4d5

Browse files
committed
wip
1 parent 21a05b0 commit b75e4d5

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pnp"
3-
version = "0.4.2"
3+
version = "0.4.3"
44
edition = "2021"
55
license = "BSD-2-Clause"
66
description = "Resolution primitives for Yarn PnP"

src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,16 @@ pub fn parse_bare_identifier(specifier: &str) -> Result<(String, Option<String>)
140140
}
141141

142142
pub fn find_closest_pnp_manifest_path<P: AsRef<Path>>(p: P) -> Option<PathBuf> {
143-
if let Some(directory_path) = p.as_ref().parent() {
144-
let pnp_path = directory_path.join(".pnp.cjs");
143+
let pnp_path = p.as_ref().join(".pnp.cjs");
145144

146-
if pnp_path.exists() {
147-
Some(pnp_path)
148-
} else {
145+
if pnp_path.exists() {
146+
Some(pnp_path)
147+
} else {
148+
if let Some(directory_path) = p.as_ref().parent() {
149149
find_closest_pnp_manifest_path(directory_path)
150+
} else {
151+
None
150152
}
151-
} else {
152-
None
153153
}
154154
}
155155

0 commit comments

Comments
 (0)