From 6c65887c15f09fea6fc168b16682b64f75a1ae16 Mon Sep 17 00:00:00 2001 From: Devin Date: Sun, 10 Dec 2023 21:02:41 +0100 Subject: [PATCH] Add the chocolatey path to PATH --- .github/workflows/full_documentation.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/full_documentation.yml b/.github/workflows/full_documentation.yml index d33436310eb..dd1d77dba9c 100644 --- a/.github/workflows/full_documentation.yml +++ b/.github/workflows/full_documentation.yml @@ -49,16 +49,24 @@ jobs: # # Install Pandoc # C:\ProgramData\chocolatey\bin\choco install pandoc -y # } - C:\ProgramData\chocolatey\bin\choco install pandoc -y - - # Add the pandoc path to PATH. - $pandocPath = Join-Path $env:ChocolateyInstall 'bin' - if ($env:PATH -notlike "*$pandocPath*") { - [Environment]::SetEnvironmentVariable('PATH', "$($env:PATH) $pandocPath", [System.EnvironmentVariableTarget]::Machine) - echo "Pandoc path added." + $chocoPath = "C:\ProgramData\chocolatey\bin" + if ($env:PATH -notlike "*$chocoPath*") { + [Environment]::SetEnvironmentVariable('PATH', "$($env:PATH) chocoPath", [System.EnvironmentVariableTarget]::Machine) + echo "Chocolatey path added. Pandoc shim is now in PATH." } else { - echo "Pandoc path is already in the PATH variable." + echo "The Chocolatey path is already in the PATH variable." } + #C:\ProgramData\chocolatey\bin\choco install pandoc -y + choco install pandoc -y + + # Add the pandoc path to PATH. + #$pandocPath = Join-Path $env:ChocolateyInstall 'bin' + #if ($env:PATH -notlike "*$pandocPath*") { + # [Environment]::SetEnvironmentVariable('PATH', "$($env:PATH) $pandocPath", [System.EnvironmentVariableTarget]::Machine) + # echo "Pandoc path added." + #} else { + # echo "Pandoc path is already in the PATH variable." + #} - name: 'Create virtual env' run: |