Skip to content

fix: call anytype binary from PATH instead of /app/anytype in cli bootstrap - #198

Open
GeekSquirrel wants to merge 1 commit into
anyproto:mainfrom
GeekSquirrel:fix/anytype-cli-bootstrap-path
Open

fix: call anytype binary from PATH instead of /app/anytype in cli bootstrap#198
GeekSquirrel wants to merge 1 commit into
anyproto:mainfrom
GeekSquirrel:fix/anytype-cli-bootstrap-path

Conversation

@GeekSquirrel

Copy link
Copy Markdown

Problem

anytype-cli v0.3.7 moved the binary from /app/anytype to /usr/local/bin/anytype — the /app directory is now empty in the image. The optional anytype-cli_bootstrap service and tests/test-anytype-cli.sh still invoked the binary by its old absolute path.

In the bootstrap service this failure was silent: anytype auth create ... || true swallowed the "not found" error and the script still exited 0, so the bot account was never created with the self-hosted network config (--network-config /etc/anytype/network.yml). As a result, config.json lacked networkConfigPath and anytype-cli silently fell back to the official Anytype network. When the bot later received a space invite, it looked for the blocks on the wrong network and only reported an opaque ipld: could not find <cid> error.

Solution

Invoke the binary by name (anytype) instead of the absolute path /app/anytype, so it resolves through PATH regardless of where the image installs it:

  • docker-compose.yml: bootstrap entrypoint, 2 occurrences
  • tests/test-anytype-cli.sh: 2 occurrences (docker compose exec inherits the image PATH)

Test plan

  • Verified against ghcr.io/anyproto/anytype-cli:latest: command -v anytype returns /usr/local/bin/anytype and /app is empty.
  • On a self-hosted network with this change, a fresh bootstrap run creates the bot account successfully and the generated config.json contains the expected networkConfigPath; the bot then connects to the self-hosted nodes and accepts space invites (previously it silently connected to the official network instead).
  • docker compose --env-file .env.example config passes.

anytype-cli v0.3.7 moved the binary from /app/anytype to
/usr/local/bin/anytype, leaving /app empty in the image. The optional
anytype-cli_bootstrap service and tests/test-anytype-cli.sh still used
the old absolute path, so account creation failed silently (the error
was swallowed by '|| true' and the script still exited 0) and the bot
account was never created with the self-hosted network config.

Invoke the binary by name so it resolves through PATH regardless of
its install location inside the image.
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@GeekSquirrel

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

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.

1 participant