Re: [Rd] system()/system2() using short paths of commands on Windows?

2023-11-17 Thread Yihui Xie
The problem in TeX Live has just been fixed. Now it will expand short names: https://tug.org/pipermail/tex-live/2023-November/049706.html Therefore please feel free to ignore my original request. Thank you! Regards, Yihui -- https://yihui.org On Thu, Nov 16, 2023 at 8:28 AM Tomas Kalibera

Re: [Rd] system()/system2() using short paths of commands on Windows?

2023-11-16 Thread Tomas Kalibera
On 10/31/23 10:05, Duncan Murdoch wrote: On 31/10/2023 4:32 a.m., Tomas Kalibera wrote: On 10/30/23 19:07, Yihui Xie wrote: Sure. I'm not sure if it's possible to make it easier to reproduce, but for now the example would require installing TinyTeX (via tinytex::install_tinytex(), which can

Re: [Rd] system()/system2() using short paths of commands on Windows?

2023-10-31 Thread Yihui Xie
Okay, thanks everyone for the clear explanations! Now I understand it much better. Before I wrote to r-devel, I guessed it was probably a problem on TeX Live's side rather than R, therefore I also reported it to them and I'm still waiting for a response. If they cannot fix it, and R's system()

Re: [Rd] system()/system2() using short paths of commands on Windows?

2023-10-31 Thread Tomas Kalibera
On 10/30/23 21:36, Yihui Xie wrote: > I have read about "system() not using a shell on Windows" on the help > page many times before but never understood what it means technically. > Please forgive my ignorance. I still do not understand it, but thanks > a lot for the explanation anyway! As the

Re: [Rd] system()/system2() using short paths of commands on Windows?

2023-10-31 Thread Duncan Murdoch
On 31/10/2023 4:32 a.m., Tomas Kalibera wrote: On 10/30/23 19:07, Yihui Xie wrote: Sure. I'm not sure if it's possible to make it easier to reproduce, but for now the example would require installing TinyTeX (via tinytex::install_tinytex(), which can be later uninstalled cleanly via

Re: [Rd] system()/system2() using short paths of commands on Windows?

2023-10-31 Thread Ivan Krylov
On Mon, 30 Oct 2023 15:36:50 -0500 Yihui Xie wrote: > I have read about "system() not using a shell on Windows" on the help > page many times before but never understood what it means technically. This means resolving the path to the executable, then calling CreateProcess() to launch that

Re: [Rd] system()/system2() using short paths of commands on Windows?

2023-10-31 Thread Tomas Kalibera
On 10/30/23 19:07, Yihui Xie wrote: > Sure. I'm not sure if it's possible to make it easier to reproduce, > but for now the example would require installing TinyTeX (via > tinytex::install_tinytex(), which can be later uninstalled cleanly via > tinytex::uninstall_tinytex() after you finish

Re: [Rd] system()/system2() using short paths of commands on Windows?

2023-10-30 Thread Yihui Xie
I have read about "system() not using a shell on Windows" on the help page many times before but never understood what it means technically. Please forgive my ignorance. I still do not understand it, but thanks a lot for the explanation anyway! I'm just curious if the full path would work in

Re: [Rd] system()/system2() using short paths of commands on Windows?

2023-10-30 Thread Prof Brian Ripley
On 30/10/2023 16:18, Yihui Xie wrote: Hi, It may have been so for 20+ years but I just discovered today that system() would always try to use the short path of a command on Windows: https://github.com/wch/r-source/blob/635a67/src/gnuwin32/run.c#L141 If that's true, I wonder if it could provide

Re: [Rd] system()/system2() using short paths of commands on Windows?

2023-10-30 Thread Yihui Xie
Sure. I'm not sure if it's possible to make it easier to reproduce, but for now the example would require installing TinyTeX (via tinytex::install_tinytex(), which can be later uninstalled cleanly via tinytex::uninstall_tinytex() after you finish the investigation). Then run:

Re: [Rd] system()/system2() using short paths of commands on Windows?

2023-10-30 Thread Tomas Kalibera
On 10/30/23 17:18, Yihui Xie wrote: Hi, It may have been so for 20+ years but I just discovered today that system() would always try to use the short path of a command on Windows: https://github.com/wch/r-source/blob/635a67/src/gnuwin32/run.c#L141 If that's true, I wonder if it could provide

[Rd] system()/system2() using short paths of commands on Windows?

2023-10-30 Thread Yihui Xie
Hi, It may have been so for 20+ years but I just discovered today that system() would always try to use the short path of a command on Windows: https://github.com/wch/r-source/blob/635a67/src/gnuwin32/run.c#L141 If that's true, I wonder if it could provide an option to disable this behavior,