fix(dev-install): detect OpenClaw CLI entrypoint dynamically#39
fix(dev-install): detect OpenClaw CLI entrypoint dynamically#39alauppe merged 2 commits intoopenclaw:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c6e22e746
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| exit 0 | ||
| fi | ||
| done | ||
| exit 1 |
There was a problem hiding this comment.
Handle missing entrypoints without shell task failure
When none of the candidate files exist, this probe exits with code 1 and ansible.builtin.shell fails the play immediately, so the following Fail if openclaw CLI entrypoint is missing task (with the clearer error message) never runs. This makes the new error-handling path unreachable in exactly the failure scenario it is meant to cover (for example, if upstream layout changes again or build artifacts are missing), so the probe should be made non-fatal (e.g., failed_when: false) and let the explicit fail task report the issue.
Useful? React with 👍 / 👎.
Co-authored-by: Aditya Advani <aditya@moltpod.com>
|
Thanks for the fix here. The underlying issue is real, and the intent is aligned with the project: development installs should not hardcode a single CLI entrypoint path when different source branches can ship different layouts. I pushed a follow-up commit onto your branch before merging. The main changes were:
Appreciate the contribution. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4cc27b4993
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| openclaw_package_json.bin | ||
| if openclaw_package_json.bin is string else | ||
| ( | ||
| openclaw_package_json.bin.openclaw | ||
| if openclaw_package_json.bin is mapping and 'openclaw' in openclaw_package_json.bin else |
There was a problem hiding this comment.
Guard missing package.json bin before dereferencing
This expression dereferences openclaw_package_json.bin repeatedly without an is defined/default guard, so if package.json exists but has no bin key (or sets bin: null), the task can fail during templating before fallback probes run. In that case the intended fallback paths (openclaw.mjs, bin/openclaw.js, dist/index.js) are never evaluated even if one exists, causing avoidable install failures.
Useful? React with 👍 / 👎.
Summary
openclaw.mjs,bin/openclaw.js,dist/index.jsbin/openclaw.jsWhy
Phantastic-AI/openclawondeploy/mattermost-latestshipsopenclaw.mjsand does not includebin/openclaw.js, which breaks dev source installs with the current hardcoded path.Validation
ansible-playbook --syntax-check playbook.yml