fix: call anytype binary from PATH instead of /app/anytype in cli bootstrap - #198
Open
GeekSquirrel wants to merge 1 commit into
Open
fix: call anytype binary from PATH instead of /app/anytype in cli bootstrap#198GeekSquirrel wants to merge 1 commit into
GeekSquirrel wants to merge 1 commit into
Conversation
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.
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
anytype-cliv0.3.7 moved the binary from/app/anytypeto/usr/local/bin/anytype— the/appdirectory is now empty in the image. The optionalanytype-cli_bootstrapservice andtests/test-anytype-cli.shstill invoked the binary by its old absolute path.In the bootstrap service this failure was silent:
anytype auth create ... || trueswallowed 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.jsonlackednetworkConfigPathandanytype-clisilently 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 opaqueipld: could not find <cid>error.Solution
Invoke the binary by name (
anytype) instead of the absolute path/app/anytype, so it resolves throughPATHregardless of where the image installs it:docker-compose.yml: bootstrap entrypoint, 2 occurrencestests/test-anytype-cli.sh: 2 occurrences (docker compose execinherits the imagePATH)Test plan
ghcr.io/anyproto/anytype-cli:latest:command -v anytypereturns/usr/local/bin/anytypeand/appis empty.config.jsoncontains the expectednetworkConfigPath; 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 configpasses.