Skip to content

Commit 5a378ce

Browse files
committed
devtool: fix permissions on .python/ after cmd_sandbox
Running the sandbox command leaves the .ipython folder as owned by root. Fix this up after exiting so that its can be accesses un-privileged after docker exits (I have a git pre-commit hook that tries to stash all unstaged changes, and it always chokes on this folder). Signed-off-by: Patrick Roy <[email protected]>
1 parent e6ceb57 commit 5a378ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/devtool

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ cmd_fix_perms() {
228228
run_devctr \
229229
--workdir "$CTR_FC_ROOT_DIR" \
230230
-- \
231-
chown -f -R "$(id -u):$(id -g)" "$CTR_FC_BUILD_DIR" "$CTR_TEST_RESULTS_DIR" "$CTR_CI_ARTIFACTS_PATH"
231+
chown -f -R "$(id -u):$(id -g)" "$CTR_FC_BUILD_DIR" "$CTR_TEST_RESULTS_DIR" "$CTR_CI_ARTIFACTS_PATH" $@
232232
}
233233

234234
# Builds the development container from its Dockerfile.
@@ -890,6 +890,7 @@ cmd_sandbox() {
890890
cmd_build --release
891891
ensure_ci_artifacts
892892
cmd_sh "tmux new env PYTEST_ADDOPTS=--pdbcls=IPython.terminal.debugger:TerminalPdb PYTHONPATH=tests IPYTHONDIR=\$PWD/.ipython ipython -i ./tools/sandbox.py $@"
893+
cmd_fix_perms ".ipython"
893894
}
894895

895896
cmd_sandbox_native() {

0 commit comments

Comments
 (0)