asdf-vm / asdf

Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more
https://asdf-vm.com/
MIT License
21.76k stars 774 forks source link

bug: `asdf update --head` odd behavior #1515

Open hyperupcall opened 1 year ago

hyperupcall commented 1 year ago

Describe the Bug

Currently asdf update --head has a few incorrect underlying assumptions (command-update.bash)

Steps to Reproduce

bats test, asdf update --head

Expected Behaviour

A main branch with configured upstream remote me properly is updated to latest asdf HEAD

Actual Behaviour

Environment

OS:
Linux Arf 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

SHELL:
GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

ASDF VERSION:
v0.11.3-bbcbddc

ASDF ENVIRONMENT VARIABLES:
ASDF_DIR=/home/edwin/.asdf

ASDF INSTALLED PLUGINS:
nodejs                       https://github.com/asdf-vm/asdf-nodejs.git master 644ada3

asdf plugins affected (if relevant)

N/A

jthegedus commented 1 year ago

@hyperupcall Some items you list I was midway through addressing with #1437

It also seems that the "asdf update --head should checkout the master branch" test consistently breaks when it is ran from a branch other than master

This was one case I had not thought of testing against.

I will push my latest changes to this PR and tag you for review to get your thoughts.

hyperupcall commented 1 year ago

Sounds good :+1: