【问题标题】:Permission issue with simple appveyor script简单的 appveyor 脚本的权限问题
【发布时间】:2017-12-06 16:28:30
【问题描述】:

所以我有一个非常简单的脚本,它只是尝试创建一个文本文件然后读取它。

version: 1.0.{build}-{branch}

shallow_clone: true

environment:
matrix:
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
    TOOLSET: msvc-14.1
    ARCH: x86_64
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
    TOOLSET: msvc-14.1
    ARCH: x86

install:
- if %ARCH% == x86 ( set TRIPLET=x86-windows ) else ( set TRIPLET=x64-windows )
- if %ARCH% == x86 ( set AM=32 ) else ( set AM=64 )
- git clone -b master --depth 1 https://github.com/boostorg/boost.git boost-root
- cd boost-root

build: off

test_script:
- set PATH=%ADDPATH%%PATH%
- |-
    set VCPKG=%APPVEYOR_BUILD_FOLDER%\..\vcpkg\installed\%TRIPLET%
    set "CHUNK=^<include^>%VCPKG%\include ^<search^>%VCPKG%\lib"
    echo using zlib : : %CHUNK% ; > config.jam
    echo using libjpeg : : %CHUNK% ; >> config.jam
    echo using libpng : : ^<name^>libpng16 %CHUNK% ; >> config.jam
    echo using libtiff : : %CHUNK% ; >> config.jam
    more config.jam

当我运行它时,我收到以下错误:

Cannot access file C:\projects\gil\boost-root\config.jam
Command exited with code 1

我错过了什么明显的错误吗?

【问题讨论】:

    标签: continuous-integration command appveyor


    【解决方案1】:

    我认为set "CHUNK=^&lt;include^&gt;%VCPKG%\include ^&lt;search^&gt;%VCPKG%\lib" 破坏了环境变量中的某些内容。尝试在= 之后先移动",例如set CHUNK="^&lt;include^&gt;%VCPKG%\include ^&lt;search^&gt;%VCPKG%\lib"

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-01-10
    • 1970-01-01
    • 2016-05-10
    • 1970-01-01
    • 2016-06-10
    • 1970-01-01
    • 2023-03-08
    • 2018-07-27
    相关资源
    最近更新 更多