@@ -208,9 +208,23 @@ jobs:
208208 exit 1
209209 fi
210210
211- # Execute external script (without execution permission, using bash command)
212- # and check its exit status
213- bash .github/check-new-release/scripts/update.sh
211+ # Check if the script has execution permissions
212+ if [ -x .github/check-new-release/scripts/update.sh ]; then
213+ # If executable, run directly
214+ echo "Running update.sh with execution permissions"
215+ .github/check-new-release/scripts/update.sh
216+ else
217+ # If not executable, explicitly use bash
218+ echo "Running update.sh via bash (no execution permissions)"
219+ bash .github/check-new-release/scripts/update.sh
220+ fi
221+
222+ # Capture exit status
223+ UPDATE_STATUS=$?
224+ if [ $UPDATE_STATUS -ne 0 ]; then
225+ echo "::error::Script update.sh exited with status $UPDATE_STATUS"
226+ exit $UPDATE_STATUS
227+ fi
214228
215229 # Capture exit status
216230 UPDATE_STATUS=$?
@@ -246,8 +260,23 @@ jobs:
246260 exit 1
247261 fi
248262
249- # Execute external script and check its exit status
250- bash .github/check-new-release/scripts/post-message.sh
263+ # Check if the script has execution permissions
264+ if [ -x .github/check-new-release/scripts/post-message.sh ]; then
265+ # If executable, run directly
266+ echo "Running post-message.sh with execution permissions"
267+ .github/check-new-release/scripts/post-message.sh
268+ else
269+ # If not executable, explicitly use bash
270+ echo "Running post-message.sh via bash (no execution permissions)"
271+ bash .github/check-new-release/scripts/post-message.sh
272+ fi
273+
274+ # Capture exit status
275+ POST_MESSAGE_STATUS=$?
276+ if [ $POST_MESSAGE_STATUS -ne 0 ]; then
277+ echo "::error::Script post-message.sh exited with status $POST_MESSAGE_STATUS"
278+ exit $POST_MESSAGE_STATUS
279+ fi
251280
252281 # Capture exit status
253282 POST_MSG_STATUS=$?
0 commit comments