mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-14 22:24:14 +00:00
tools: Make hub usage slightly less fragile
`grep`ing by a specific output, in a specific language, is quite fragile and could easily break `hub`. For now, let's work this around following James' suggestion of setting `LC_ALL=C LANG=C` when calling `hub`. > **Note**: I don't think we should invest much time on fixing `hub` > usage, as it'll be soon replaced by `gh`, see: > https://github.com/kata-containers/kata-containers/issues/3083 Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
76540dbdd1
commit
85eb743f46
@ -255,7 +255,7 @@ EOT
|
|||||||
${hub_bin} push fork -f "${branch}"
|
${hub_bin} push fork -f "${branch}"
|
||||||
info "Create PR"
|
info "Create PR"
|
||||||
out=""
|
out=""
|
||||||
out=$("${hub_bin}" pull-request -b "${target_branch}" -F "${notes_file}" 2>&1) || echo "$out" | grep "A pull request already exists"
|
out=$(LC_ALL=C LANG=C "${hub_bin}" pull-request -b "${target_branch}" -F "${notes_file}" 2>&1) || echo "$out" | grep "A pull request already exists"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${repo}" == "kata-containers" ] && [ "${target_branch}" == "main" ] && [[ "${new_version}" =~ "rc" ]]; then
|
if [ "${repo}" == "kata-containers" ] && [ "${target_branch}" == "main" ] && [[ "${new_version}" =~ "rc" ]]; then
|
||||||
@ -276,7 +276,7 @@ EOT
|
|||||||
${hub_bin} push fork -f "${reverting_kata_deploy_changes_branch}"
|
${hub_bin} push fork -f "${reverting_kata_deploy_changes_branch}"
|
||||||
info "Create \"${reverting_kata_deploy_changes_branch}\" PR"
|
info "Create \"${reverting_kata_deploy_changes_branch}\" PR"
|
||||||
out=""
|
out=""
|
||||||
out=$("${hub_bin}" pull-request -b "${target_branch}" -F "${notes_file}" 2>&1) || echo "$out" | grep "A pull request already exists"
|
out=$(LC_ALL=C LANG=C "${hub_bin}" pull-request -b "${target_branch}" -F "${notes_file}" 2>&1) || echo "$out" | grep "A pull request already exists"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user