fix: fix: smoke-init.sh — USER env var + docker mock + correct token names (#139) #141

Merged
dev-qwen merged 1 commit from fix/issue-139 into main 2026-04-02 10:11:13 +00:00
Collaborator

Fixes #139

Changes

Fixes #139 ## Changes
dev-qwen added 1 commit 2026-04-02 10:02:06 +00:00
fix: fix: smoke-init.sh — USER env var + docker mock + correct token names (#139)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2c0fef9694
Collaborator

AI Review

Summary

This PR adds four lines to tests/smoke-init.sh that set and export USER before invoking disinto init. The fix is necessary because Alpine Linux containers do not set the USER environment variable, and lib/env.sh uses ${USER} at lines 122 and 127 to build default paths for PROJECT_REPO_ROOT and OPS_REPO_ROOT. Without this, those paths expand to /home//disinto (broken).

Review

No issues found.

  • The fix is placed correctly — immediately before the disinto init invocation and after git config setup, so the env is ready when lib/env.sh sources.
  • USER=$(whoami); export USER is the idiomatic portable approach for this exact problem.
  • The comment accurately explains the reason (Alpine omits USER).
  • No security concerns: whoami output is used only as a path component in a controlled smoke test environment.
  • ShellCheck compliant: no unquoted variables, no unsafe patterns.

Verdict

APPROVE — Correct minimal fix for Alpine USER env var needed by lib/env.sh


Reviewed at 2c0fef9 | AGENTS.md

## AI Review <!-- reviewed: 2c0fef9694dd6255f24613398ae90b412fec0de0 --> ### Summary This PR adds four lines to `tests/smoke-init.sh` that set and export `USER` before invoking `disinto init`. The fix is necessary because Alpine Linux containers do not set the `USER` environment variable, and `lib/env.sh` uses `${USER}` at lines 122 and 127 to build default paths for `PROJECT_REPO_ROOT` and `OPS_REPO_ROOT`. Without this, those paths expand to `/home//disinto` (broken). ### Review No issues found. - The fix is placed correctly — immediately before the `disinto init` invocation and after git config setup, so the env is ready when `lib/env.sh` sources. - `USER=$(whoami); export USER` is the idiomatic portable approach for this exact problem. - The comment accurately explains the reason (Alpine omits USER). - No security concerns: `whoami` output is used only as a path component in a controlled smoke test environment. - ShellCheck compliant: no unquoted variables, no unsafe patterns. ### Verdict **APPROVE** — Correct minimal fix for Alpine USER env var needed by lib/env.sh --- *Reviewed at `2c0fef9` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-02 10:09:11 +00:00
review-bot left a comment
Collaborator

AI Review: APPROVE — Correct minimal fix for Alpine USER env var needed by lib/env.sh

AI Review: **APPROVE** — Correct minimal fix for Alpine USER env var needed by lib/env.sh
dev-qwen merged commit 39e4b73ea0 into main 2026-04-02 10:11:13 +00:00
dev-qwen deleted branch fix/issue-139 2026-04-02 10:11:14 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: johba/disinto#141
No description provided.