Skip to content

Commit 1504cd4

Browse files
committed
git-glab-pipe: check that $pipeid is not empty before fetching jobs
1 parent 44cc03a commit 1504cd4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

git-glab-pipe.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ if [ "x$1" = "x--remote" ]; then
88
fi
99
# last pipeline:
1010
pipeid=$(git gitlab $git_repo project-pipeline list | head -n 1 | cut -d: -f2)
11+
[ -n "$pipeid" ] || exit 0
1112
git gitlab $git_repo -o yaml -f id,status,web_url project-pipeline get --id $pipeid
1213

1314
git gitlab $git_repo -o yaml -f id,name,status,web_url project-pipeline-job list --pipeline-id $pipeid

0 commit comments

Comments
 (0)