From f7ba17a685628e62e730250fc5d08650ec64c167 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 25 Jul 2022 01:15:32 -0400 Subject: [PATCH] chore: run shfmt --- .devcontainer/20_init_plugin | 4 ++-- install | 4 ++-- tests/hook_pre_delete.bats | 4 ++-- tests/service_export.bats | 2 +- tests/service_import.bats | 2 +- tests/service_link.bats | 1 - tests/service_restart.bats | 1 - tests/service_start.bats | 1 - tests/service_stop.bats | 1 - tests/service_unexpose.bats | 1 - 10 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.devcontainer/20_init_plugin b/.devcontainer/20_init_plugin index d2f4cd2..5520506 100755 --- a/.devcontainer/20_init_plugin +++ b/.devcontainer/20_init_plugin @@ -18,7 +18,7 @@ main() { # built in the Dockerfile PLUGIN_NAME="$(source /tmp/.env && echo "$PLUGIN_NAME")" PLUGIN_VARIABLE="$(source /tmp/.env && echo "$PLUGIN_VARIABLE")" - echo "export ${PLUGIN_VARIABLE}_HOST_ROOT=${SERVICE_HOST_ROOT}/$PLUGIN_NAME" > /etc/default/dokku + echo "export ${PLUGIN_VARIABLE}_HOST_ROOT=${SERVICE_HOST_ROOT}/$PLUGIN_NAME" >/etc/default/dokku } -main "$@" \ No newline at end of file +main "$@" diff --git a/install b/install index 70a1d13..d1ef8e3 100755 --- a/install +++ b/install @@ -50,8 +50,8 @@ EOL if [[ ! -f "$SERVICE_ROOT/IMAGE" ]] || [[ ! -f "$SERVICE_ROOT/IMAGE_VERSION" ]]; then local image="$(service_version "$SERVICE")" if [[ "$image" == *":"* ]]; then - echo "${image%:*}" > "$SERVICE_ROOT/IMAGE" - echo "${image##*:}" > "$SERVICE_ROOT/IMAGE_VERSION" + echo "${image%:*}" >"$SERVICE_ROOT/IMAGE" + echo "${image##*:}" >"$SERVICE_ROOT/IMAGE_VERSION" fi fi diff --git a/tests/hook_pre_delete.bats b/tests/hook_pre_delete.bats index 19809b1..e849887 100755 --- a/tests/hook_pre_delete.bats +++ b/tests/hook_pre_delete.bats @@ -13,7 +13,7 @@ teardown() { } @test "($PLUGIN_COMMAND_PREFIX:hook:pre-delete) removes app from links file when destroying app" { - [[ -n $(< "$PLUGIN_DATA_ROOT/l/LINKS") ]] + [[ -n $(<"$PLUGIN_DATA_ROOT/l/LINKS") ]] dokku --force apps:destroy my-app - [[ -z $(< "$PLUGIN_DATA_ROOT/l/LINKS") ]] + [[ -z $(<"$PLUGIN_DATA_ROOT/l/LINKS") ]] } diff --git a/tests/service_export.bats b/tests/service_export.bats index 4d70d6e..845702c 100755 --- a/tests/service_export.bats +++ b/tests/service_export.bats @@ -23,7 +23,7 @@ teardown() { if [[ -n "$GITHUB_WORKFLOW" ]]; then skip "No tty is available on Github Actions" fi - export SSH_TTY=`tty` + export SSH_TTY=$(tty) run dokku "$PLUGIN_COMMAND_PREFIX:export" l echo "output: $output" echo "status: $status" diff --git a/tests/service_import.bats b/tests/service_import.bats index 49a451d..fefcaf7 100755 --- a/tests/service_import.bats +++ b/tests/service_import.bats @@ -34,7 +34,7 @@ teardown() { @test "($PLUGIN_COMMAND_PREFIX:import) success" { skip "The fake dump is hard to work with in tests" - run dokku "$PLUGIN_COMMAND_PREFIX:import" l < "/tmp/fake.dump.tar" + run dokku "$PLUGIN_COMMAND_PREFIX:import" l <"/tmp/fake.dump.tar" echo "output: $output" echo "status: $status" assert_success diff --git a/tests/service_link.bats b/tests/service_link.bats index c047fa9..e086390 100755 --- a/tests/service_link.bats +++ b/tests/service_link.bats @@ -13,7 +13,6 @@ teardown() { dokku --force apps:destroy my-app } - @test "($PLUGIN_COMMAND_PREFIX:link) error when there are no arguments" { run dokku "$PLUGIN_COMMAND_PREFIX:link" echo "output: $output" diff --git a/tests/service_restart.bats b/tests/service_restart.bats index a1b7ef9..e74cc47 100755 --- a/tests/service_restart.bats +++ b/tests/service_restart.bats @@ -23,4 +23,3 @@ teardown() { run dokku "$PLUGIN_COMMAND_PREFIX:restart" l assert_success } - diff --git a/tests/service_start.bats b/tests/service_start.bats index af65496..adff1d2 100755 --- a/tests/service_start.bats +++ b/tests/service_start.bats @@ -23,4 +23,3 @@ teardown() { run dokku "$PLUGIN_COMMAND_PREFIX:start" l assert_success } - diff --git a/tests/service_stop.bats b/tests/service_stop.bats index 02b573b..826bc91 100755 --- a/tests/service_stop.bats +++ b/tests/service_stop.bats @@ -23,4 +23,3 @@ teardown() { run dokku "$PLUGIN_COMMAND_PREFIX:stop" l assert_success } - diff --git a/tests/service_unexpose.bats b/tests/service_unexpose.bats index c236604..1442728 100755 --- a/tests/service_unexpose.bats +++ b/tests/service_unexpose.bats @@ -25,4 +25,3 @@ teardown() { [[ ! -f $PLUGIN_DATA_ROOT/PORT ]] assert_contains "${lines[*]}" "Service l unexposed" } -