Skip to content

Commit e03dafb

Browse files
committed
feat(brew-bump): add check for is_executable
1 parent e834616 commit e03dafb

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

ci/steps/brew-bump.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,16 @@ main() {
6969
exit 1
7070
fi
7171

72-
# TODO@jsjoeio - check that git-askpass.sh was created
7372
# Ensure it's executable since we just created it
7473
chmod +x "$HOME/git-askpass.sh"
7574

76-
# TODO@jsjoeio - check that git-askpass.sh has executable permissions
75+
# Make sure the git-askpass.sh file is executable
76+
if [[ $(is_executable "$HOME/git-askpass.sh") -eq 1 ]]; then
77+
echo "git-askpass.sh is not executable."
78+
ls -la "$HOME/git-askpass.sh"
79+
exit 1
80+
fi
81+
7782
# GIT_ASKPASS lets us use the password when pushing without revealing it in the process list
7883
# See: https://serverfault.com/a/912788
7984
GIT_ASKPASS="$HOME/git-askpass.sh" git push https://[email protected]/cdr-oss/homebrew-core.git --all

test/scripts/steps-lib.bats

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ source "$SCRIPT"
3131
}
3232

3333
@test "file_exists should 0 if file exists" {
34-
run file_exists "steps-lib.bats"
34+
run file_exists "$SCRIPT"
3535
[ "$output" = 0 ]
3636
}
3737

0 commit comments

Comments
 (0)