I just chat it with a lab member and he also has also this concern.
Another concern is I cannot use ^C or ^D to cancel when dune starts scanning after I realize it’s at a wrong path.
$ code> dune build 15:26:46
Info: Creating file dune-project with this contents:
| (lang dune 2.8)
Scanned 600 directories ...
I also had tried directory-based way e.g. direnv or alias dune with a script to check the path though none of them looks very good to me…