Skip to content

install.sh --docker: chown scaffold output before the host-side git phase #1235

Closed

Description

@c-vigo

Problem

Under --docker, the scaffold output is written root-owned via the bind mount. install.sh's host-side git phase (setup_git_repo, wrapped warn-not-fail around install.sh:946) then runs against the still-root-owned tree and fails with .git: Permission denied — by design only a warning, so the installer "succeeds" but leaves a root-owned tree with no git repo. Every --docker caller on a hosted runner must then repair ownership and git init by hand; the direnv smoke lane (devkit-smoke-test#286, #1194) carries exactly that workaround (unconditional chown + post-hoc git init).

The warn-not-fail posture of the git phase is deliberate (CI/fresh-machine friendliness) and should stay.

Suggested fix

In the --docker path, chown the scaffold output back to the invoking user before the git phase runs, so setup_git_repo succeeds normally and downstream workarounds become unnecessary. Then simplify the direnv smoke lane's workaround in assets/smoke-test/.github/workflows/direnv-smoke.yml (and devkit-smoke-test) once released.

Found during review of the #1194 lane (both failed iterations of devkit-smoke-test#286 root-caused to this). Low priority — everything works today with the workaround in place.

Refs: #1194

Activity

  1. added
    chore
    area:workspace
    on Jul 21, 2026
  2. added this to the 1.4.1 milestone on Jul 21, 2026
  3. c-vigo commented on Jul 21, 2026

    @c-vigo
    ContributorAuthor

    Fixed on dev via PR #1245 (merge commit 53b637e): on the docker runtime only, a throwaway container chowns /workspace to the invoking uid:gid after the scaffold run and before setup_git_repo; rootless podman is skipped (already uid-mapped). Covered by bats tests incl. ordering. The smoke-lane manual chown workaround can be simplified once this releases. Ships with 1.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workspacechore

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions