Skip to content

Commit

Permalink
Merge pull request #3621 from uselagoon/drush_cr_taskfix
Browse files Browse the repository at this point in the history
chore: use safer drush cr status check for version
  • Loading branch information
tobybellwood authored Dec 13, 2023
2 parents 10c1d76 + c9a0094 commit e72152e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/api/src/resources/task/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -595,11 +595,11 @@ export const taskDrushCacheClear: ResolverFn = async (
});

const command =
'drupal_version=$(drush status drupal-version --format=list) && \
'drupal_version=$(drush status | grep -i "drupal version" | awk \'{print $NF}\') && \
if [ ${drupal_version%.*} == "7" ]; then \
if drush cc all; then echo "drush cc all complete"; else exit $?; fi; \
elif [ ${drupal_version%.*.*} -ge "8" ] ; then \
if drush cr; then echo "drush cr complete"; else exit $?; fi; \
if drush cr -y; then echo "drush cache:rebuild complete"; else exit $?; fi; \
else \
echo "could not clear cache for found Drupal Version ${drupal_version}"; \
exit 1; \
Expand Down

0 comments on commit e72152e

Please sign in to comment.