could not parse as YAML: yaml: 第102行: 未找到预期的键

huangapple go评论57阅读模式
英文:

could not parse as YAML: yaml: line 102: did not find expected key

问题

我正在尝试创建一个 GitHub 工作流 YAML 来构建 x86_64-pc-linux-gcc 工具链,但我一直遇到一个错误:“无法解析为 YAML:yaml: 第 102 行:未找到预期的键 yaml-syntax”,但我似乎找不到问题。

这是我的 YAML 链接:

https://github.com/7dog123/GCC-toolchain/blob/master/.github/workflows/cygwin.yml

英文:

I'm trying to create a github workflow yaml to build a x86_64-pc-linux-gcc toolchain but I keep getting an error "could not parse as YAML: yaml: line 102: did not find expected key yaml-syntax" but I can't seem to find the problem.

here's the link to my yaml:

https://github.com/7dog123/GCC-toolchain/blob/master/.github/workflows/cygwin.yml

答案1

得分: 1

你的YAML文件存在几个错误。

例如,在这里:

    - name: configure GCC
      run: |
       cd gcc
       mkdir gcc-${{ env.TARGET_ALIAS }}
      ## 在x86_64主机上,将64位库的默认目录名称设置为“lib”
       case $(uname -m) in
         x86_64)
       ...

# 开头的那一行与上面的缩进不匹配,这结束了文字块。

这个错误在文档的多个地方都发生,截止到当前写作时:

英文:

Your YAML has several errors.

For example, here:

    - name: configure GCC
      run: |
       cd gcc
       mkdir gcc-${{ env.TARGET_ALIAS }}
      ## On x86_64 hosts, set the default directory name for 64-bit libraries to “lib”
       case $(uname -m) in
         x86_64)
       ...

The line starting with # doesn't match the indentation above, which ends the literal string block.

This same error occurs several times throughout the document, at time of writing:

huangapple
  • 本文由 发表于 2023年4月11日 09:15:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/75981768.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定