【发布时间】:2021-06-01 15:26:23
【问题描述】:
在我的操作 yml 文件中,我为我的 ctest 输入图像文件设置了一个指向根目录的环境变量(我运行 ctest 来测试图像编解码器解压缩器,这些是输入图像)。
env:
DATA_ROOT: ${{github.workspace}}/data
在 Windows 上,这给了我类似 c:\Foo\Bar/data 的信息,我想将其转换为
c:/Foo/Bar/data
我可以在 PowerShell 中进行转换:
$temp = ${DATA_ROOT}
$pattern = '[\\]'
$temp = $temp -replace $pattern, '/'
但是我如何将${DATA_ROOT} 重置为等于$temp?
我希望后续步骤使用新的 ${DATA_ROOT} 。
【问题讨论】:
标签: windows powershell cmake path github-actions