cderv / r-bucket

Personal scoop bucket I use as an R user and software engineer
49 stars 3 forks source link

Launching RStudio Preview opens temporary cmd prompt #18

Closed baslat closed 2 years ago

baslat commented 2 years ago

Hi,

Thanks for putting this together. When I launch RStudio Preview installed from, it is accompanied by a very quick opening and closing of a cmd prompt. It opens and closes so quickly I cannot see what it's actually doing though. This happens every time I create a new instance of RStudio. Ideas?

Thanks!

cderv commented 2 years ago

Hi,

I tried on my side (Windows 11), and I don't see the CMD command

Does Rstudio IDE opens correctly ? Does it happens only with the preview ? (or any app used with Scoop ?)

Scoop will create some shims when an app is installed, and those shims can be .bat file, so executed in a CMD window.

On my side I got an exe though

❯ scoop shim info rstudio-preview

Name     : rstudio-preview
Path     : C:\Users\chris\scoop\shims\rstudio-preview.exe
Source   : rstudio-preview
Type     : Application
IsGlobal : False
IsHidden : False

do you have the same if you type the command or look into your shims folder ? (should be in %USERPROFILE%/scoop/shims if you type in Windows explorer)

baslat commented 2 years ago

My results (also Windows 11):

~ $ scoop shim info rstudio-preview

Name     : rstudio-preview
Path     : C:\Users\baslat\scoop\shims\rstudio-preview.exe
Source   : rstudio-preview
Type     : Application
IsGlobal : False
IsHidden : False

I thought it might also be the shims, so I checked launching the target exe directly ("C:\Users\baslat\scoop\apps\rstudio-preview\2022.02.0+443\bin\rstudio.exe"), and this also creates the and closes the cmd prompt.

I also installed the rstudio scoop app from the extras bucket, which appears to be the same version RStudio, and it too creates the cmd prompt, so maybe it's an RStudio thing?

~ $ scoop list rstudio
Installed apps matching 'rstudio':

Name            Version       Source   Updated             Info
----            -------       ------   -------             ----
rstudio         2022.02.0-443 extras   2022-03-15 06:03:30
rstudio-preview 2022.02.0+443 r-bucket 2022-03-13 14:03:26

Does Rstudio IDE opens correctly ?

Yes, apart from the cmd prompt.

Does it happens only with the preview ? (or any app used with Scoop ?)

Other scoop apps do not do this.

cderv commented 2 years ago

so I checked launching the target exe directly ("C:\Users\baslat\scoop\apps\rstudio-preview\2022.02.0+443\bin\rstudio.exe"), and this also creates the and closes the cmd prompt.

Then it is possible that this is a rstudio thing.

I am getting the preview from here: https://www.rstudio.com/products/rstudio/download/preview/ and dailies from https://dailies.rstudio.com/rstudio/spotted-wakerobin/desktop/windows-xcopy/

I am taking the installer less version for both. You could try download them directly and see if it happens to check that it is not scoop related.

baslat commented 2 years ago

I haven't checked those links yet, but I think it's related to git.

baslat commented 2 years ago

Ok I think I have fixed it, and it was indeed related to git. In RStudio my setting for the git execeutable was poitning to "C:\Users\baslat\scoop\shims\git.exe".

Changing to "C:\Users\baslat\scoop\apps\git\current\cmd\git.exe" (the target of the shim) stopped the pop-ups (and restored the git pane in RStudio).

cderv commented 2 years ago

Oh ! That is interesting - thanks for having that documented in here. I don't think I use git with scoop so I would have find that.