我需要在 Gitlab Pipeline 期间运行 WiX Toolset V3.14.1
light
命令,但它永远无法运行。
tags:
- saas-windows-medium-amd64 # to use Windows runner
在作业执行期间,我使用 Chocolatey 安装 WiX
choco install -y --ignore-dependencies --no-progress wixtoolset
build_windows:
tags:
- saas-windows-medium-amd64 # to use Windows runner
stage: build
script:
- choco install -y --ignore-dependencies --no-progress wixtoolset
- corepack enable
- Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
- light
即使安装后,也无法识别
light
命令。我收到的消息如下所示:
light : The term 'light' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
当我在本地 Windows 10 计算机中运行每个命令时,它运行良好。
有人知道 Gitlab 中的 WiX Toolset 有什么问题吗?
非常感谢。
我通过使用 Gitlab 运行程序中安装的
light
的实际路径(C:\Program Files (x86)\Wix Toolset 3.14 in\light.exe)修复了该问题,然后为 light
命令创建别名
我的工作最后是这样的
build_windows:
tags:
- saas-windows-medium-amd64 # to use Windows runner
stage: build
script:
- choco install -y --ignore-dependencies --no-progress wixtoolset
- corepack enable
- Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
- Set-Alias light "C:\Program Files (x86)\WiX Toolset v3.14\bin\light.exe"
- light
我可以使用
light
命令!
谢谢!