Skip to content

Error: Unable to update checked out version: exit status 128 #107

@jkroepke

Description

@jkroepke

Hi,

helm is using this go library for installing plugins.

I got an error today, if there is a branch name which has the same name as a local file:


% helm plugin install "https://github.com/jkroepke/helm-secrets" --version "dockerfile"
Error: Unable to update checked out version: exit status 128
% ls Dockerfile
Dockerfile
% git checkout dockerfile
fatal: 'dockerfile' could be both a local file and a tracking branch.
Please use -- (and optionally --no-guess) to disambiguate

To fix this, add 2 hypen at the end of the command, for example:

% git checkout dockerfile --
branch 'dockerfile' set up to track 'origin/dockerfile'.
Switched to a new branch 'dockerfile'

See: https://stackoverflow.com/questions/25322335/git-change-branch-when-file-of-same-name-is-present

Code, needs to be changed:

vcs/git.go

Line 161 in 7d3c358

out, err := s.RunFromDir("git", "checkout", version)

Git Version: git version 2.39.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions