Skip to content

Commit

Permalink
Add error handling for DESCRIPTION
Browse files Browse the repository at this point in the history
Following the suggestion in [this comment](#51580 (comment))

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
GiulioCentorame and coderabbitai[bot] authored Oct 23, 2024
1 parent c343b16 commit ad1ded4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions recipes/r-locuszoomr/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash
export DISABLE_AUTOBREW=1
mv DESCRIPTION DESCRIPTION.old
grep -va '^Priority: ' DESCRIPTION.old > DESCRIPTION
if [ ! -f DESCRIPTION ]; then
echo "Error: DESCRIPTION file not found"
exit 1
fi
mv DESCRIPTION DESCRIPTION.old || exit 1
grep -va '^Priority: ' DESCRIPTION.old > DESCRIPTION || exit 1
${R} CMD INSTALL --build . ${R_ARGS}

0 comments on commit ad1ded4

Please sign in to comment.