X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/4d6a84a8294d035747404d00b88a925fc2640e1e..cf75673e1a2c993025a2113ce194d5c65f311c85:/action/entrypoint.sh?ds=sidebyside diff --git a/action/entrypoint.sh b/action/entrypoint.sh index dc86fa1..30bf4eb 100755 --- a/action/entrypoint.sh +++ b/action/entrypoint.sh @@ -1,10 +1,9 @@ -#!/bin/sh -set -e +#!/bin/bash -e -if [ $# -eq 0 ]; then - # Default (if no args provided). - sh -c "black . --check --diff" -else - # Custom args. - sh -c "black $*" +if [ -n "$INPUT_BLACK_ARGS" ]; then + echo '::warning::Input `with.black_args` is deprecated. Use `with.options` and `with.src` instead.' + black $INPUT_BLACK_ARGS + exit $? fi + +black $INPUT_OPTIONS $INPUT_SRC