Fix calling commands individually

This commit is contained in:
Arnie 2017-12-25 09:42:09 +01:00
parent 3fea4a6c78
commit f6640a44e2
4 changed files with 8 additions and 7 deletions

View File

@ -5,9 +5,9 @@ __csscomb() {
__msg "Csscomb:" __msg "Csscomb:"
if [[ ${DRY_RUN} -eq 0 ]]; then if [[ ${DRY_RUN} -eq 0 ]]; then
csscomb -v "$@" csscomb -v "${CSS_FILES[@]}"
else else
csscomb --lint -v "$@" csscomb --lint -v "${CSS_FILES[@]}"
fi fi
return $? return $?

View File

@ -10,6 +10,7 @@ __phpFixer() {
if [[ ${DRY_RUN} -eq 0 ]]; then if [[ ${DRY_RUN} -eq 0 ]]; then
for file in "${PHP_FILES[@]}"; do for file in "${PHP_FILES[@]}"; do
php-cs-fixer fix "${file}" php-cs-fixer fix "${file}"
[[ $? -ne 0 ]] && failed=1
done done
else else
local needs_fixing=() local needs_fixing=()

View File

@ -5,10 +5,10 @@ __prettier() {
__msg "Prettier:" __msg "Prettier:"
if [[ ${DRY_RUN} -eq 0 ]]; then if [[ ${DRY_RUN} -eq 0 ]]; then
prettier --write "$@" prettier --write "${JS_FILES[@]}"
else else
__msg "Listing (: unprettiered :) files:" 1 __msg "Listing (: unprettiered :) files:" 1
prettier --list-different "$@" prettier --list-different "${JS_FILES[@]}"
fi fi
return $? return $?

View File

@ -11,19 +11,19 @@ process() {
# Run css comb # Run css comb
if [[ ${#CSS_FILES[@]} -ne 0 ]]; then if [[ ${#CSS_FILES[@]} -ne 0 ]]; then
__csscomb "${CSS_FILES[@]}" __csscomb
[[ $? -ne 0 ]] && failed=1 [[ $? -ne 0 ]] && failed=1
fi fi
# Run JS prettier # Run JS prettier
if [[ ${#JS_FILES[@]} -ne 0 ]]; then if [[ ${#JS_FILES[@]} -ne 0 ]]; then
__prettier "${JS_FILES[@]}" __prettier
[[ $? -ne 0 ]] && failed=1 [[ $? -ne 0 ]] && failed=1
fi fi
# Run PHP cs fixer # Run PHP cs fixer
if [[ ${#PHP_FILES[@]} -ne 0 ]]; then if [[ ${#PHP_FILES[@]} -ne 0 ]]; then
__phpFixer ${PHP_FILES[@]} __phpFixer
[[ $? -ne 0 ]] && failed=1 [[ $? -ne 0 ]] && failed=1
fi fi