mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
update number of relative paths to deal with tests
This commit is contained in:
parent
d47c4616f2
commit
fbcea3f3f5
1 changed files with 3 additions and 3 deletions
|
@ -81,9 +81,9 @@ pub fn get_relative_path(sub_path: &Path) -> Option<PathBuf> {
|
|||
|
||||
let mut curr_parent_opt = exe_relative_str_path.parent();
|
||||
|
||||
// this differs for regular build and nix releases, so we check in multiple spots.
|
||||
// We also need to drop at least 2 folders to go from ./target/debug/... to ./...
|
||||
for _ in 0..3 {
|
||||
// We need to support paths like ./roc, ./bin/roc, ./target/debug/roc and tests like ./target/debug/deps/valgrind-63c787aa176d1277
|
||||
// This requires dropping up to 3 directories.
|
||||
for _ in 0..=3 {
|
||||
if let Some(curr_parent) = curr_parent_opt {
|
||||
let potenial_path = curr_parent.join(sub_path);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue