Skip to content

Commit

Permalink
Remove warning in choco installation by providing full path
Browse files Browse the repository at this point in the history
this one
```
WARNING: May not be able to find 'cmd.exe'. Please use full path for executables.
```
  • Loading branch information
cderv committed Mar 21, 2023
1 parent edb4207 commit b1ad25e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion choco/tools/chocolateybeforemodify.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ $toolsDir = Get-ToolsLocation

Write-Host "Generating extra installed packages."
$installed_packages_command = "/C `"$toolsdir\TinyTeX\bin\windows\tlmgr.bat info --list --only-installed --data name > $toolsDir/tinytex-pkg-installed.txt`""
Start-ChocolateyProcessAsAdmin $installed_packages_command "cmd.exe"
Start-ChocolateyProcessAsAdmin $installed_packages_command "$env:WINDIR\system32\cmd.exe"

4 changes: 2 additions & 2 deletions choco/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ if ($pp['AddToSystemPath'] -eq 'true') {
# AddToUserPath
$statementsToRun = "/C `"$toolsDir\TinyTeX\bin\windows\tlmgr.bat path add`""
}
Start-ChocolateyProcessAsAdmin $statementsToRun "cmd.exe"
Start-ChocolateyProcessAsAdmin $statementsToRun "$env:WINDIR\system32\cmd.exe"

Write-Host "Updating tlmgr"
#updates tlmgr
$statementsToRun = "/C `"$toolsDir\TinyTeX\bin\windows\tlmgr.bat update --self`""
Start-ChocolateyProcessAsAdmin $statementsToRun "cmd.exe"
Start-ChocolateyProcessAsAdmin $statementsToRun "$env:WINDIR\system32\cmd.exe"


$files = get-childitem $toolsDir -include *.exe -recurse
Expand Down
2 changes: 1 addition & 1 deletion choco/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ If ([Environment]::GetEnvironmentVariables("User").Path -split ";" | ?{$_ -like
$statementsToRun = "/C `"$toolsDir\TinyTeX\bin\windows\tlmgr.bat path --w32mode=admin remove`""
}

Start-ChocolateyProcessAsAdmin $statementsToRun "cmd.exe"
Start-ChocolateyProcessAsAdmin $statementsToRun "$env:WINDIR\system32\cmd.exe"

0 comments on commit b1ad25e

Please sign in to comment.