File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
test/blackbox-tests/test-cases/pkg Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,15 @@ Call Dune with an absolute PATH as argv[0]:
9292 $ PATH= $ fakepath $ DUNE build " $ pkg_root /$ foo_digest /target/"
9393 $ PATH= $ fakepath $ DUNE build " $ pkg_root /$ bar_digest /target/"
9494
95- Make sure that fake dune is not picked up when dune is called with argv[0 ] = " dune" :
95+ argv[0 ] is set by the calling program (like a shell or cram test runner) and
96+ could be wrong, hence it cannot always be trusted. In the examples above we
97+ launch dune with an absolute path, thus one could just use argv[0 ] to get the
98+ exact path to the `dune` binary .
99+
100+ To make sure that we pick up the right dune even when argv[0 ] is being set to
101+ unhelpful values we launch the binary but set the value to a relative value ,
102+ namely argv[0 ] = " dune" . This is exactly what happens if `dune` is in the PATH
103+ and the user launches `dune` in a shell .
96104
97105 $ dune clean
98106 $ PATH= $ fakepath dune_cmd exec-a " dune" $ DUNE build " $ pkg_root /$ foo_digest /target/"
You can’t perform that action at this time.
0 commit comments