Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jkroepke opened this issue Jan 23, 2023 · 0 comments
Open

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

jkroepke opened this issue Jan 23, 2023 · 0 comments

Comments

@jkroepke
Copy link

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

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

No branches or pull requests

1 participant