Skip to content

Commit

Permalink
fix: devtool fix_perms command
Browse files Browse the repository at this point in the history
PR firecracker-microvm#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 <[email protected]>
  • Loading branch information
bchalios committed Oct 17, 2024
1 parent d84d76c commit 1881187
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/devtool
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1881187

Please sign in to comment.