gpt4 book ai didi

当failOnStderr : true , bash错误出现时,Azure脚本任务没有这个标志

转载 作者:行者123 更新时间:2023-12-03 00:40:56 25 4
gpt4 key购买 nike

我有有线行为当任务中未设置failOnStderr:true时,一切正常,但是
当我使用failOnStderr:true调用这样的脚本任务时:

- script:  |
echo 'Start invoking Fastfile'
fastlane release --verbose projectName:${{parameters.projectName}} appIdentifier:${{parameters.appIdentifier}} versionNumber:${{parameters.versionNumber}} buildNumber:${{parameters.buildNumber}} plistFileFtpBasePath:${{parameters.plistFileFtpBasePath}} ArtifactsDirectory:$(System.ArtifactsDirectory)
echo 'Done invoking Fastfile'
failOnStderr: true
workingDirectory: '$(System.ArtifactsDirectory)/ios_artifacts'
displayName: 'create keychain invoke fastlane'

我收到此错误:

2020-09-30T07:54:45.8179430Z INFO [2020-09-30 07:54:45.81]: [32mfastlane.tools finished successfully 🎉[0m
2020-09-30T07:54:45.8917310Z Done invoking Fastfile
2020-09-30T07:54:45.8948720Z
2020-09-30T07:54:45.9020160Z ##[error]Bash wrote one or more lines to the standard error stream.
2020-09-30T07:54:45.9033610Z ##[error]/Users/runner/hostedtoolcache/Ruby/2.7.1/x64/lib/ruby/gems/2.7.0/gems/fastlane-2.161.0/fastlane_core/lib/fastlane_core/ui/interface.rb:141: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/runner/hostedtoolcache/Ruby/2.7.1/x64/lib/ruby/gems/2.7.0/gems/fastlane-2.161.0/fastlane_core/lib/fastlane_core/ui/errors/fastlane_error.rb:9: warning: The called method `initialize' is defined here

2020-09-30T07:54:45.9035550Z ##[error]security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.

2020-09-30T07:54:45.9037370Z ##[error]/Users/runner/hostedtoolcache/Ruby/2.7.1/x64/lib/ruby/gems/2.7.0/gems/fastlane-2.161.0/gym/lib/gym/generators/package_command_generator_xcode7.rb:154: warning: URI.escape is obsolete

2020-09-30T07:54:45.9040080Z ##[error]/Users/runner/hostedtoolcache/Ruby/2.7.1/x64/lib/ruby/gems/2.7.0/gems/fastlane-2.161.0/gym/lib/gym/generators/package_command_generator_xcode7.rb:155: warning: URI.escape is obsolete
/Users/runner/hostedtoolcache/Ruby/2.7.1/x64/lib/ruby/gems/2.7.0/gems/fastlane-2.161.0/gym/lib/gym/generators/package_command_generator_xcode7.rb:156: warning: URI.escape is obsolete

2020-09-30T07:54:45.9042740Z ##[error]warning: /Users/runner/Library/Developer/Xcode/Archives/2020-09-30/xxxx_2019.1.4.xxxx-xxxx.1.1.0.4_SPRINT_14 2020-09-30 07.51.27.xcarchive/BCSymbolMaps/1BD5CB31-31FC-328B-A827-73EA51BB6041.bcsymbolmap: No such file or directory: not unobfuscating.

2020-09-30T07:54:45.9045210Z ##[error]warning: /Users/runner/Library/Developer/Xcode/Archives/2020-09-30/xxxx_1.1.xxxx-xxxx.1.1.0.4_SPRINT_14 2020-09-30 07.51.27.xcarchive/BCSymbolMaps/9FCBA8ED-D8FD-3C16-9740-5E2A31F3E959.bcsymbolmap: No such file or directory: not unobfuscating.

2020-09-30T07:54:45.9047670Z ##[error]warning: /Users/runner/Library/Developer/Xcode/Archives/2020-09-30/xxxx_1.1.xxxx-xxxx.1.1.0.4_SPRINT_14 2020-09-30 07.51.27.xcarchive/BCSymbolMaps/999C2967-8A06-3CD5-82D7-D156E9440A0C.bcsymbolmap: No such file or directory: not unobfuscating.

2020-09-30T07:54:45.9050110Z ##[error]warning: /Users/runner/Library/Developer/Xcode/Archives/2020-09-30/xxxx_1.1.xxxx-xxxx.1.1.0.4_SPRINT_14 2020-09-30 07.51.27.xcarchive/BCSymbolMaps/EB7DF7BE-351D-3A4A-949C-0AE12606A3E2.bcsymbolmap: No such file or directory: not unobfuscating.

2020-09-30T07:54:45.9052570Z ##[error]warning: /Users/runner/Library/Developer/Xcode/Archives/2020-09-30/xxxx_1.1.xxxx-xxxx.1.1.0.4_SPRINT_14 2020-09-30 07.51.27.xcarchive/BCSymbolMaps/9702769F-1F06-3001-AB75-5AD38E1F7D66.bcsymbolmap: No such file or directory: not unobfuscating.

2020-09-30T07:54:45.9055030Z ##[error]warning: /Users/runner/Library/Developer/Xcode/Archives/2020-09-30/xxxx_1.1.xxxx-xxxx.1.1.0.4_SPRINT_14 2020-09-30 07.51.27.xcarchive/BCSymbolMaps/D560471D-F43F-30D6-9717-5252EE100F10.bcsymbolmap: No such file or directory: not unobfuscating.

2020-09-30T07:54:45.9056620Z ##[error]Additional writes to stderr truncated
2020-09-30T07:54:45.9063410Z ##[section]Finishing: create keychain invoke fastlane

更新当设置为 false 时仍然不起作用

- script:  |
echo 'Start invoking Fastfile'
fastlane release --verbose projectName:${{parameters.projectName}} appIdentifier:${{parameters.appIdentifier}} versionNumber:${{parameters.versionNumber}} buildNumber:${{parameters.buildNumber}} plistFileFtpBasePath:${{parameters.plistFileFtpBasePath}} ArtifactsDirectory:$(System.ArtifactsDirectory)
echo 'Done invoking Fastfile'
failOnStderr: false
workingDirectory: '$(System.ArtifactsDirectory)/ios_artifacts'
displayName: 'create keychain invoke fastlane'

enter image description here

最佳答案

这是预期的行为。

设置failOnStderr: true后,如果任何错误写入StandardError流,任务将会失败。

enter image description here

相反,如果failOnStderrfalse,任务的失败将取决于退出代码。当退出代码不是0时,任务将失败。

正常情况下,您应该知道将错误写入 stderr 不会导致退出代码为非零。 failOnStderrtruefalse 是两种不同的失败条件。

根据您分享的日志:

2020-09-30T07:54:45.9020160Z ##[error]Bash wrote one or more lines to the standard error stream.

您可以看到Stderr流中写入了一些错误。此时,任务按预期失败,因为您将 failOnStderr 设置为 true

更新:

示例:

成功但有警告:

enter image description here

因 stderr 失败:

enter image description here

关于当failOnStderr : true , bash错误出现时,Azure脚本任务没有这个标志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64133371/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com