Skip to content

Commit 8df04ab

Browse files
committed
chore: testing on CI
1 parent 0400f4f commit 8df04ab

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
strategy:
1515
matrix:
1616
os:
17-
- ubuntu-latest
18-
- macos-latest
17+
# - ubuntu-latest
18+
# - macos-latest
1919
- windows-latest
2020
runs-on: ${{ matrix.os }}
2121
steps:
@@ -35,4 +35,4 @@ jobs:
3535
run: cargo build
3636

3737
- name: Run tests
38-
run: cargo test
38+
run: cargo test -- --nocapture

src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@ pub fn init_pnp_manifest<P: AsRef<Path>>(manifest: &mut Manifest, p: P) {
298298

299299
info.package_location = PathBuf::from(normalized_location);
300300

301+
println!("info.package_location: {}", info.package_location.display());
302+
301303
if !info.discard_from_lookup {
302304
manifest.location_trie.insert(
303305
&info.package_location,
@@ -349,6 +351,12 @@ pub fn find_locator<'a, P: AsRef<Path>>(
349351
}
350352
}
351353

354+
println!("path {}", path.as_ref().to_string_lossy());
355+
356+
let path = util::normalize_path(path.as_ref().to_string_lossy());
357+
358+
println!("path {}", path);
359+
352360
manifest.location_trie.get_ancestor_value(&path)
353361
}
354362

src/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use serde::{de::Error, Deserialize, Deserializer};
33
use std::borrow::Cow;
44

55
use path_slash::PathBufExt;
6-
use std::path::{Path, PathBuf};
6+
use std::path::{Path, PathBuf, MAIN_SEPARATOR_STR};
77

88
#[derive(Debug, Default, Clone)]
99
pub struct Trie<T> {
@@ -39,7 +39,7 @@ pub fn normalize_path<P: AsRef<str>>(original: P) -> String {
3939
let p = PathBuf::from(original_str);
4040
let mut str = clean_path::clean(p).to_slash_lossy().to_string();
4141

42-
if original_str.ends_with('/') && !str.ends_with('/') {
42+
if original_str.ends_with(MAIN_SEPARATOR_STR) && !str.ends_with('/') {
4343
str.push('/');
4444
}
4545

0 commit comments

Comments
 (0)