similar to: system()/system2() using short paths of commands on Windows?

Displaying 20 results from an estimated 7000 matches similar to: "system()/system2() using short paths of commands on Windows?"

2023 Oct 30
1
system()/system2() using short paths of commands on Windows?
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 an option to disable this > behavior, because we recently ran into
2023 Oct 30
1
system()/system2() using short paths of commands on Windows?
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 an option to disable this > behavior, because we recently ran into a
2023 Oct 30
2
system()/system2() using short paths of commands on Windows?
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 system() today. If it still would not work because today's Windows is still like Windows
2023 Oct 30
1
system()/system2() using short paths of commands on Windows?
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: system2('fmtutil-sys', '--all') # or tinytex:::fmtutil() if fmtutil-sys.exe is not on PATH
2023 Oct 31
1
system()/system2() using short paths of commands on Windows?
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 documentation says, system() on Windows runs the command directly, without a
2023 Oct 31
1
system()/system2() using short paths of commands on Windows?
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 the investigation). Then > run: > > ? system2('fmtutil-sys',
2023 Nov 16
1
system()/system2() using short paths of commands on Windows?
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 be later uninstalled cleanly via
2023 Oct 31
1
system()/system2() using short paths of commands on Windows?
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 >> tinytex::uninstall_tinytex() after you finish the
2019 Dec 15
1
system2 doesn't quote stdin on unix, unlike stdout, stderr & input and on Windows
Hi again! While investigating the bug report [*] I found out that on unix, system2 does not quote its `stdin` argument while preparing the command line to launch. It does shQuote the `stdout` and `stderr` arguments, and also the `f <- tmpfile()` variable (which is used if `input` argument is provided), which seems to set a precedent. On Windows, stdin, stdout, and stderr are handled
2015 May 18
4
How best to get around shadowing of executables by system()'s prepending of directories to Windows' PATH?
My question: On Windows, R's system() command prepends several directories to those in the Windows Path variable. >From ?system The search path for 'command' may be system-dependent: it will include the R 'bin' directory, the working directory and the Windows system directories before 'PATH'. This shadows any executables on the Path that share a
2011 Jun 20
1
Quote the path of graphics output in Sweave when it contains spaces
Hi, I'm aware of the definition of a "valid filename" in .SweaveValidFilenameRegexp, but I think it might be better to quote the filename when it contains spaces instead of just giving a warning. This should bring us safer LaTeX code (although I never use spaces in paths). Here is the simple patch: Index: src/library/utils/R/SweaveDrivers.R
2010 Nov 02
1
system() and system2() functions
Hello, I help to maintain a moderate library of R code. In this code we have a number of calls to the system function along the lines of: exe_output = system("./executable.exe",intern=T) We tend to prefer system() over shell() because, provided the executable has been compiled and the working directory set, the command works under both linux and windows. We've never had a
2014 Dec 10
2
UTF8 markdown vignette
On 09/12/2014, 10:36 PM, Yihui Xie wrote: > I took a look at the R source and I realized that the encoding was > actually never passed to the vignette engine: > https://github.com/wch/r-source/blob/e721ef5f4/src/library/tools/R/Vignettes.R#L507 > Apparently only the file and quiet arguments are passed to the > vignette engine. Did I miss anything? I think it's actually a little
2014 May 14
1
Bug in read.dcf(all = TRUE)?
Hi, read.dcf() can modify the locale variable LC_CTYPE, and here is a minimal example: > Sys.getlocale('LC_CTYPE') [1] "en_US.UTF-8" > read.dcf(textConnection('a: b'), all = TRUE) a 1 b > Sys.getlocale('LC_CTYPE') [1] "C" After diagnosing the problem, it seems the on.exit() call in read.dcf() is the culprit:
2011 Jun 15
1
animation error
Hello, While running the following code I encountered a bit of a funny error. First the code: library(animation) ani.options(convert = shQuote('C:/Program Files/ImageMagick-6.7.0-Q16/convert.exe')) plot.ani<-function() { for (ts in 1:730){ dat<-read.table(paste("c:/temp/ConcProfile_",ts,".txt",sep=""),
2014 Dec 19
1
UTF8 markdown vignette
On 18/12/2014, 12:17 AM, Yihui Xie wrote: > For the record, I saw a change had been made in R-devel: > https://github.com/wch/r-source/commit/d53b098 (Thanks, Duncan) > Meanwhile, I also made a change in knitr to assume UTF-8 unless R > passes an encoding to the vignette engine: > https://github.com/yihui/knitr/commit/23c6c8e2 Both will solve the > original problem, but
2014 Dec 09
3
UTF8 markdown vignette
On 09/12/2014, 4:38 PM, ONKELINX, Thierry wrote: > Dear Yihui, > > I have created a reproducible example at https://github.com/ThierryO/utf8vignette > > The \usepackage{} line is needed, otherwise R CMD check --as-cran will give a warning. > %\VignetteEncoding{UTF-8} did not solve the problem. I've just taken a look at the sources, and that's only in R-devel, it never
2019 Feb 28
2
Exit status of Rscript
Current R release (3.5.2) and devel return a 0 exit status on error, while prior versions returned a non-zero exit status. On Linux and MacOs, the following line returns TRUE for R-3.5.2 and R-devel, and FALSE for R-3.5.1 and R-3.5.0: system2("Rscript", c("-e", shQuote("stop('foo')"))) == 0 I didn't find this in the NEWS, so I believe this is a bug.
2014 Jun 04
1
Package keyval Error: noupquote undefined
Hi, Due to a change in Rd.sty a few days ago (https://github.com/wch/r-source/commit/620eb9a#diff-3bf3d821c6faae50cd6ec931f6f63296L272), the default installation of TeXLive 2009 or 2012 no longer works when building Rd to PDF. The error log is like this: =============== Converting Rd files to LaTeX ..... Creating pdf output from LaTeX ... Error in texi2dvi(file = file, pdf = TRUE, clean = clean,
2014 Apr 24
1
The regular expressions in compareVersion()
Hi, I guess the backslash should not be used as the separator for strsplit() in compareVersion(), because the period in [.] is no longer a metacharacter (no need to "escape" it using a backslash): https://github.com/wch/r-source/blob/trunk/src/library/utils/R/packages.R#L866-L867 > compareVersion function (a, b) { .... a <- as.integer(strsplit(a, "[\\.-]")[[1L]])