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

bug: asdf update --head odd behavior #1515

Open
hyperupcall opened this issue Mar 25, 2023 · 2 comments · May be fixed by #1437
Open

bug: asdf update --head odd behavior #1515

hyperupcall opened this issue Mar 25, 2023 · 2 comments · May be fixed by #1437
Labels

Comments

@hyperupcall
Copy link
Contributor

hyperupcall commented Mar 25, 2023

Describe the Bug

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

  • Assumes master is default branch (these days more people are configuring Git to use main by default)
  • Assumes "default" remote name is origin (command breaks on rename)
  • It also seems that the "asdf update --head should checkout the master branch" test consistenly breaks when it is ran from a branch other than master

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

  • Branch master gets created

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
Copy link
Contributor

@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.

@jthegedus jthegedus linked a pull request Mar 26, 2023 that will close this issue
@hyperupcall
Copy link
Contributor Author

Sounds good 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants