We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e73be2 commit 706bab4Copy full SHA for 706bab4
.buildkite/hooks/pre-command
@@ -23,7 +23,7 @@ check_if_file_exist_in_repo() {
23
branchName="master"
24
fi
25
local path_to_file="cd/release/release-manager/project-configs/${branchName}/${fileName}"
26
- local response=$(curl -s -H "Authorization: token $GITHUB_REPO_TOKEN" https://api.github.com/repos/elastic/${repoName}/contents/${path_to_file}| grep -c "\"path\"\: \"${path_to_file}\"")
+ local response=$(curl --fail -s -H "Authorization: token $GITHUB_REPO_TOKEN" https://api.github.com/repos/elastic/${repoName}/contents/${path_to_file}| grep -c "\"path\"\: \"${path_to_file}\"")
27
if [[ ${response} -ge 1 ]]; then
28
export FILE_EXISTS_IN_REPO=true
29
echo "FILE_EXIST_IN_REPO = true"
0 commit comments