From ef74e19c5a60027146e49e83341d5639038e048b Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Thu, 21 Nov 2024 16:59:46 +0900 Subject: [PATCH] fix(docker): fix `cleanup_apt.sh` (#5467) * echo Signed-off-by: Yutaka Kondo * fix Signed-off-by: Yutaka Kondo * remove echo Signed-off-by: Yutaka Kondo * style(pre-commit): autofix --------- Signed-off-by: Yutaka Kondo Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- docker/scripts/cleanup_apt.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/scripts/cleanup_apt.sh b/docker/scripts/cleanup_apt.sh index 883df9ba8a..0b0d43fea1 100755 --- a/docker/scripts/cleanup_apt.sh +++ b/docker/scripts/cleanup_apt.sh @@ -1,11 +1,11 @@ #!/bin/bash -function cleanup() { - local remove_var_lib_apt_lists=false +function cleanup_apt() { + local remove_var_lib_apt_lists=$1 apt-get autoremove -y && rm -rf "$HOME"/.cache - if "$remove_var_lib_apt_lists"; then + if [[ $remove_var_lib_apt_lists == true ]]; then rm -rf /var/lib/apt/lists/* fi } -cleanup "$@" +cleanup_apt "$@"