Skip to content

fix: create .env in workspace directory during provisioning#135

Merged
jwm4 merged 1 commit intomainfrom
fix/issue-70-workspace-env
Apr 20, 2026
Merged

fix: create .env in workspace directory during provisioning#135
jwm4 merged 1 commit intomainfrom
fix/issue-70-workspace-env

Conversation

@jwm4
Copy link
Copy Markdown
Collaborator

@jwm4 jwm4 commented Apr 20, 2026

Summary

  • Adds touch .env after the workspace mkdir -p in all three bootstrap paths: local initScript, local bootstrap, and K8s init container
  • The agent's AGENTS.md instructs it to source .env silently and the heartbeat verifies workspace files are present, but no code path actually created the file
  • touch is idempotent so it won't overwrite an existing .env

Closes #70. Supersedes #90 (which only covered the initScript path).

Test plan

  • npm run build passes
  • npm test passes (383/383)

🤖 Generated with Claude Code

The agent's AGENTS.md instructs it to source .env silently, and the
heartbeat checks that workspace files are present, but no code path
actually created the file. Add `touch .env` after the workspace mkdir
in all three bootstrap paths: local initScript, local bootstrap, and
K8s init container.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jwm4
Copy link
Copy Markdown
Collaborator Author

jwm4 commented Apr 20, 2026

Tested manually: deployed to OpenShift namespace bmurdock-ak13-openclaw from this branch. Confirmed the init container script includes the touch command and .env exists (empty, 0 bytes) in the workspace directory at deploy time.

$ oc exec openclaw-d4cf99ddb-mdvh7 -c gateway -- sh -c 'ls -la /home/node/.openclaw/workspace-*/.env'
-rw-rw----. 1 1001240000 1001240000 0 Apr 20 20:50 /home/node/.openclaw/workspace-bmurdock_ak13/.env

(Comment from Claude Code, under the supervision of Bill Murdock.)

@jwm4 jwm4 merged commit b42154f into main Apr 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workspace .env not created by installer; heartbeat check fails

1 participant