Skip to content

Commit 9abf4df

Browse files
ocaisaboegel
andauthored
Remove unused variable, make sure required envvar is set
Co-authored-by: Kenneth Hoste <kenneth.hoste@ugent.be>
1 parent f157eac commit 9abf4df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

install_scripts.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ display_help() {
1010

1111
file_changed_in_pr() {
1212
local full_path="$1"
13-
local base_branch="${2:-origin/2023.06-software.eessi.io}" # Default to origin/2023.06-software.eessi.io
1413

1514
# Make sure file exists
1615
[[ -f "$full_path" ]] || return 1
@@ -29,7 +28,8 @@ file_changed_in_pr() {
2928
# Check if the file changed in the PR diff file that we have
3029
(
3130
cd "$repo_root" || return 2
32-
if [ -f "$PR_DIFF" ]; then # PR_DIFF should be set by the calling script
31+
# $PR_DIFF should be set by the calling script
32+
if [[ ! -z ${PR_DIFF} ]] && [[ -f "$PR_DIFF" ]]; then
3333
grep -q "b/$rel_path" "$PR_DIFF" # Add b/ to match diff patterns
3434
else
3535
return 3

0 commit comments

Comments
 (0)