From 895086f8c7e62b8eb40260927f91dd96f22188d4 Mon Sep 17 00:00:00 2001 From: Babis Chalios Date: Thu, 17 Oct 2024 12:37:53 +0200 Subject: [PATCH] fix: devtool fix_perms command PR https://github.com/firecracker-microvm/firecracker/pull/4856 extended the `fix_perms` devtool command to also fix permissions of the directory in which we put CI artifacts from `build_ci_artifacts` command. Since, we are now calling `fix_perms` from two different "workflows", i.e. build/test and CI artifacts building, it might be the case that some of the directories `fix_perms` is trying to fix permissions for, don't exist. Add `-f` flag to `chown` command of `fix_perms`, to avoid issues. Signed-off-by: Babis Chalios --- tools/devtool | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/devtool b/tools/devtool index 0d58447b1fe..66c9a80818b 100755 --- a/tools/devtool +++ b/tools/devtool @@ -233,7 +233,7 @@ cmd_fix_perms() { run_devctr \ --workdir "$CTR_FC_ROOT_DIR" \ -- \ - chown -R "$(id -u):$(id -g)" "$CTR_FC_BUILD_DIR" "$CTR_TEST_RESULTS_DIR" "$CTR_CI_ARTIFACTS_PATH" + chown -f -R "$(id -u):$(id -g)" "$CTR_FC_BUILD_DIR" "$CTR_TEST_RESULTS_DIR" "$CTR_CI_ARTIFACTS_PATH" } # Builds the development container from its Dockerfile.