命令xcopy "$SITEPACKAGES\\google" "build\\lib\\google" /i /e /h
失败,并显示Invalid number of parameters
on Windows on AppVeyor (Visual Studio2019)。
我已经在我的计算机上的Windows虚拟机中确认了命令的正确语法,并且通过回显同一行:echo "$SITEPACKAGES\\google" "build\\lib\\google" /i /e /h
生成C:\Python37-x64\Lib\site-packages\google build\lib\google /i /e /h
,确认了$SITEPACKAGES
变量和转义反斜杠的正确设置,现在不再按预期显示引号。
该命令从外壳脚本运行,就像appveyor.yml
中的普通命令一样,如下所示:
build_script:
- cmd: "sh wxPython/build/Windows/build-all.sh"
我也试着不转义反斜杠,但结果是一样的。
我迷路了。有什么想法吗?
发布于 2020-10-24 14:50:26
找到了最干净的解决方案:不要在AppVeyor中混用Windows和Linux (WSL)环境(或者一般情况下)。
使用sh
或bash
调用外壳脚本,然后使用cp -r $SITEPACKAGES/google build/lib/
和appveyor.yml
以Unix方式复制文件夹
build_script:
- cmd: sh somecommand.sh
或者直接调用Windows批处理脚本,然后在appveyor.yml
中使用Windows的复制命令xcopy "$SITEPACKAGES\\google" "build\\lib\\google" /i /e /h
build_script:
- somecommand.bat
https://stackoverflow.com/questions/64424550
复制相似问题