-
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.
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.
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。