From b7cf1dc4c28fbabbd2e11534d4ea15dbe3a4ccb2 Mon Sep 17 00:00:00 2001 From: "Sebastian K. Sorensen" Date: Sun, 10 Jan 2021 15:32:37 +0100 Subject: [PATCH 1/4] Change action name to regular one --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index c049b74..63aacb7 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,4 @@ -name: Prettier Action Plugins +name: Prettier Action description: Automatically runs prettier on all your changes. author: Conrad Großer From a35b5cc1cb8c736496a07cbf95bfd8bb7a3b59fe Mon Sep 17 00:00:00 2001 From: "Sebastian K. Sorensen" Date: Sun, 10 Jan 2021 15:50:05 +0100 Subject: [PATCH 2/4] Change default to empty string instead --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 63aacb7..a0d155c 100644 --- a/action.yml +++ b/action.yml @@ -38,7 +38,7 @@ inputs: prettier_plugins: description: Install Prettier plugins, i.e. `@prettier/prettier-php @prettier/some-other-plugin` required: false - default: false + default: '' runs: using: 'docker' From 0faaf9bad1e9e0da4d30387b5c7ac07fd6839f86 Mon Sep 17 00:00:00 2001 From: "Sebastian K. Sorensen" Date: Sun, 10 Jan 2021 15:57:13 +0100 Subject: [PATCH 3/4] Use POSIX brackets instead --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 8cabb43..7d14feb 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -30,7 +30,7 @@ echo "Installing prettier..." case $INPUT_PRETTIER_VERSION in false) npm install --silent --global prettier - if [[ -n $INPUT_PRETTIER_PLUGINS ]]; then + if [ -n $INPUT_PRETTIER_PLUGINS ]; then npm install --silent --global $INPUT_PRETTIER_PLUGINS fi ;; From 1015fa1aafb6f212c867f6ebbf9fb6ea99a4326d Mon Sep 17 00:00:00 2001 From: "Sebastian K. Sorensen" Date: Sun, 10 Jan 2021 15:57:48 +0100 Subject: [PATCH 4/4] Use quotes when using [ --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 7d14feb..78e004c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -30,7 +30,7 @@ echo "Installing prettier..." case $INPUT_PRETTIER_VERSION in false) npm install --silent --global prettier - if [ -n $INPUT_PRETTIER_PLUGINS ]; then + if [ -n "$INPUT_PRETTIER_PLUGINS" ]; then npm install --silent --global $INPUT_PRETTIER_PLUGINS fi ;;