malxau/yori

Running a .bat script to change the directory does not change the directory

Beliavsky opened this issue · 3 comments

If I have a script foo.bat with contents "cd c:\foo", running that script within yori does not change the directory. In CMD it does.

Duplicate of #51
If you want to change directory via scripts in Yori, just rename it to .ys1 so it is executed by Yori, not CMD

In #51 , I said that fixing this may be possible but hadn't looked into it. It looks like somebody else described how this can work at https://stackoverflow.com/questions/14018280/how-to-get-a-process-working-dir-on-windows which is almost exactly how Yori is currently getting the environment block from CMD processes, so I should just be able to extend this logic to the current directory as well. If two people have hit this, it seems likely to keep causing problems for other people too.

This should be fixed in 1.50, released today. Please let me know if there are further related issues.