Skip to content

Commit

Permalink
make sure to trim package.json segment from end of string
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Jan 17, 2025
1 parent e0ab150 commit 74e73fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/cli/src/lib/walker-package-ranger.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ function derivePackageRoot(resolved) {
}
}

root = root.replace(`${segment}/`, '');
// make sure we are trimming from the end
root = root.substring(0, root.lastIndexOf(segment));
}

return root;
Expand Down

0 comments on commit 74e73fe

Please sign in to comment.