And while at it also strip the last comma in the generated list.
# However getting them before exporting the configuration and generating the
# profile is cleaner.
#
# However getting them before exporting the configuration and generating the
# profile is cleaner.
#
-ENABLED_MODULES="$($DRUSH pm-list --type=module --status=enabled --pipe | tr '\n' ',')"
-ENABLED_THEMES="$($DRUSH pm-list --type=theme --status=enabled --pipe | tr '\n' ',')"
+ENABLED_MODULES="$($DRUSH pm-list --type=module --field=name --status=enabled --pipe | tr '\n' ',' | sed 's/,$//')"
+ENABLED_THEMES="$($DRUSH pm-list --type=theme --field=name --status=enabled --pipe | tr '\n' ',' | sed 's/,$//')"
$DRUPAL_CONSOLE generate:profile \
--profile="$PROFILE_TITLE" \
$DRUPAL_CONSOLE generate:profile \
--profile="$PROFILE_TITLE" \