plugn icon indicating copy to clipboard operation
plugn copied to clipboard

plugin using 'main' default branch ends up in error during plugn update

Open Cactusbone opened this issue 2 years ago • 2 comments

See https://github.com/dokku/plugn/blob/3cb228fbfea4f76473b8b9bc7bd29f701f859a32/bashenv/plugn.bash#L53

git checkout master &> /dev/null does not work when no 'master' branch exists. (newly created github projects uses main as default)

Seen here: https://github.com/dokku/dokku/discussions/5041

However to work around it, I changed my default branch to 'master'.

Using something like git checkout refs/remotes/origin/HEAD should work

Cactusbone avatar Mar 02 '22 15:03 Cactusbone

Good catch! Mind making an MR for this?

josegonzalez avatar May 10 '22 21:05 josegonzalez

I think I can get this fixed.

~~Is there a reason a lot of the the git commands end in &>/dev/null instead of >/dev/null? Unless it's some obscure syntax, I don't see much of a reason to run all the commands in the background. It might even be detrimental when you checkout a new commit before the pull finishes.~~ Oh, I see. It redirects stdout and stderr.

killjoy1221 avatar Mar 26 '24 18:03 killjoy1221