[BUG] help should not actually perform anything
Description
I'm trying to upgrade gk-cli's package on nixpkgs
When i run one of the following commands :
gk --help
gk version
I got the following error :
Installing GitKraken core
cannot remove old binary: remove /etc/profiles/per-user/pinage404/bin/gk: read-only file system.
please, check if some MCP server is running, and shut it down
I am expecting that this commands do not write stuff on the filesystem
GitKraken CLI Version
3.1.9
OS Version
- system:
"x86_64-linux" - host os:
Linux 6.12.40, NixOS, 25.05 (Warbler), 25.05.20250726.13e8d35 - multi-user?:
yes - sandbox:
yes - version:
nix-env (Nix) 2.28.4 - nixpkgs:
/nix/store/vjk8x60zj28wj5n07276s0cj7594bncn-source
Git Version
git version 2.49.0
Logs, Screenshots, Screen Captures, URLs, etc
No response
Hi! We check for updates every 24 hours (only once a day) and, if any are available, we download them before executing any commands. This ensures that you're always running the latest version and that any bugs are fixed before executing any commands.
In your case, it looks like you're currently installing GitKraken Core. This indicates that it wasn't previously installed on your system, which is why we’re writing stuff on the filesystem
Hi,
Nix is a package manager that focuses on reproducibility
Nix enforces reproducibility by ensuring that packages are read-only while being packaged
Once packaged, the package can write elsewhere in the system during execution, but it cannot rewrite itself
This prevents a system from working one day and not working the next because an unwanted update has occurred
I don't currently know how to package it
Could you add an option or environment variable to disable the update check ?
How about adding a flag called "--not-core" so you can use "gk version --not-core"? This will return the version of the packaged binary, but not the main/core binary that will be installed/updated by ourself
the main/core binary that will be installed/updated by ourself
Does it mean that you will replace the existing binary later ?
If yes, i don't know how to package this
No, we are not replacing that binary. Let me clarify: we currently have two binaries. The first is the "launcher" (or "proxy"), which is the one you download or package. The second is the "core" binary, which is installed and automatically updated by the launcher
In order to avoid trying to write on a read-only filesystem, can we customize the path of the core binary ?
No, we can't do that. The only viable solution I can see is to create a flag for the "version" command that prints the CLI version without downloading anything. For the rest of the commands, we need to install the “core” binary
Maybe, instead of packaging only the launcher, the launcher + core binary can be packaged together
Can we have an URL that point to a pinned version of the core binary ?
The only solution I can offer is this: https://github.com/gitkraken/gk-cli/issues/136#issuecomment-3156463140
Modify our command to get the package version, but running any other command will download and install the other binary in other location
Hi @pinage404 ! Have you thought about this? Do you think the solution is valid?