Skip to content
代码片段 群组 项目
  • Vitaly Slobodin's avatar
    529429ff
    Ensure git clean state after running license_finder · 529429ff
    Vitaly Slobodin 创作于 Jennifer Li's avatarJennifer Li 提交于
    Our script for validating licenses does not restore
    a clean git state because the whole script "scripts/license-check.sh"
    is marked as "set -e" which means if any command fails with a non-zero
    exit code the script terminates its execution. The failing scenario
    is:
    1. We start "license-check.sh" script which modifies "Gemfile.lock"
    due to a workaround described inside of the script.
    2. Then we run "license_finder" gem.
    3. If it exits with a non-zero status code then
       the next command "git checkout -q" will never execute.
    
    The simplest solution to resolve that failing scenario is
    to capture the exit code of "license_finder" gem, store it,
    restore the git clean state and exit with this exit code.
    529429ff
    历史
    Ensure git clean state after running license_finder
    Vitaly Slobodin 创作于 Jennifer Li's avatarJennifer Li 提交于
    Our script for validating licenses does not restore
    a clean git state because the whole script "scripts/license-check.sh"
    is marked as "set -e" which means if any command fails with a non-zero
    exit code the script terminates its execution. The failing scenario
    is:
    1. We start "license-check.sh" script which modifies "Gemfile.lock"
    due to a workaround described inside of the script.
    2. Then we run "license_finder" gem.
    3. If it exits with a non-zero status code then
       the next command "git checkout -q" will never execute.
    
    The simplest solution to resolve that failing scenario is
    to capture the exit code of "license_finder" gem, store it,
    restore the git clean state and exit with this exit code.
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。