harness / harness/harness-cli

harness update fails: harness: text file busy

Open
#84 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
25
Forks
25
PR merge metrics
No merged PRs in 30d

Description

$ harness update
[notice] A new release of harness cli is available: v0.0.25-Preview → v0.0.29
https://github.com/harness/harness-cli/releases/tag/v0.0.29
To update, run: harness update
New version v0.0.29 is available.
? Do you want to update? Yes
Downloading the following - https://github.com/harness/harness-cli/releases/download/v0.0.29/harness-v0.0.29-linux-arm64.tar.gz
Unpacking the contents and extracting to - /home/unop/.local/bin
Extracting harness cli to - /home/unop/.local/bin/harness
FATA[2025-04-14T09:48:16+02:00] open /home/unop/.local/bin/harness: text file busy

The updater is attempting to overwrite the same binary (~/.local/bin/harness) that is being used to perform the update - I wonder - Is this even possible?

As an aside, on update failures, it'd be nice if the updater informed the user of the location of the downloaded binaries, so they could re-use them to manually correct the failed update. e.g.

$ harness update
...
Downloading the following - https://github.com/harness/harness-cli/releases/download/v0.0.29/harness-v0.0.29-linux-arm64.tar.gz
Unpacking the contents and extracting to - /home/unop/.local/bin
Extracting harness cli to - /tmp/harness.AE1F94CD/harness
FATA[2025-04-14T09:48:16+02:00] open /home/unop/.local/bin/harness: text file busy

In place update failed. Please run the following commands to complete update.

   mv /tmp/harness.AE1F94CD/harness /home/unop/.local/bin

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the harness update entry point and reproduce the failure on Linux ARM64 using the reported in-place update path. Trace how the downloaded binary is extracted and installed, then verify that an update does not fail while replacing the running binary and that failures report the downloaded file and a usable manual recovery command.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.