Skip to content

Commit b9529b7

Browse files
authored
Trace unhandled path (#59)
1 parent 9e5eb00 commit b9529b7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ pub fn process_transform(program: Program, _metadata: TransformPluginProgramMeta
4040
let cwd = &raw_cwd.replace('\\', "/");
4141
let path = &raw_path.replace('\\', "/");
4242

43-
let relative_path = path.strip_prefix(cwd).unwrap();
43+
let relative_path = path
44+
.strip_prefix(cwd)
45+
.unwrap_or_else(|| panic!("Unhandled path: cwd: {}, path: {}", cwd, path));
4446

4547
let dir_type = if relative_path.starts_with("/pages") || relative_path.starts_with("/src/pages")
4648
{

0 commit comments

Comments
 (0)