dsherret / dax

Cross-platform shell tools for Deno and Node.js inspired by zx.
MIT License
997 stars 34 forks source link

fix: copy path resolution #87

Closed sigmaSd closed 1 year ago

sigmaSd commented 1 year ago

The test case shows the problematic usage

This whole path manipulation is really fragile, I wonder if there is a guideline somewhere on how to handle this, at least in case of dax we have tests

Note: rustJoin in dax seems to have a different result then the actual rust join

rust

In: Path::new("/tmp/88032199/a/d2").join("/tmp/88032199/a/d1/f")
Out: "/tmp/88032199/a/d1/f"

deno: rustJoin

 rustJoin("/tmp/88032199/a/d2", "/tmp/88032199/a/d1/f")
"/tmp/88032199/a/d2/d1/f"

not sure if its important or not