Skip to content

Commit 5e8b017

Browse files
authored
fix: refresh PATH on the same terminal
1 parent 7e3b7db commit 5e8b017

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Vagrantfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Vagrant.configure("2") do |config|
2626
# Install rtools40
2727
Invoke-WebRequest -Uri "https://cran.r-project.org/bin/windows/Rtools/rtools40-x86_64.exe" -OutFile "rtools.exe"
2828
Start-Process "./rtools.exe" -Argument "/Silent" -PassThru -Wait
29-
${DOLLAR}env:PATH += ";C:\\rtools40\\usr\\bin;C:\rtools40\\mingw64\\bin"
30-
[Environment]::SetEnvironmentVariable("PATH", ${DOLLAR}Env:PATH + ";C:\\rtools40\\usr\\bin;C:\\rtools40\\mingw64\\bin", [EnvironmentVariableTarget]::Machine)
29+
[Environment]::SetEnvironmentVariable("PATH", ${DOLLAR}Env:Path + ";C:\\rtools40\\usr\\bin;C:\\rtools40\\mingw64\\bin", [EnvironmentVariableTarget]::Machine)
30+
${DOLLAR}env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
3131
C:\\rtools40\\msys2.exe pacman -Sy --noconfirm mingw-w64-x86_64-make
3232
Remove-Item -Path ./rtools.exe
3333
# Resize disk

0 commit comments

Comments
 (0)