Asdf: Update command fails on macOS after first installation

Created on 15 Jan 2019  路  3Comments  路  Source: asdf-vm/asdf

Steps to reproduce

Make sure .asdf folder doesn't exist (first time installation)

$ brew install asdf

Follow instructions from #425

$ asdf update

Expected behavior

asdf should proceed to the upgrade

Actual behavior

/usr/local/opt/asdf/lib/commands/update.sh: line 5: cd: /Users/xxx/.asdf: No such file or directory

Environment

OS: macOS 10.14.2

asdf version: 0.6.2

bug

All 3 comments

It looks like asdf is assuming we installed it via git clone:

$ asdf update
fatal: not a git repository (or any of the parent directories): .git

Though in this case, we would most likely run brew upgrade asdf.

@dmlemos the behavior is correct but the error message it outputs is not. We need to add another check to make sure the directory exists before trying to cd to it, and if it doesn't exist print the message about not being able to upgrade.

@heydonovan can you try out that PR I just created? I think I fixed the issue but I'm not sure since I was not able to reproduce it locally.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kevinkjt2000 picture kevinkjt2000  路  4Comments

rhiroyuki picture rhiroyuki  路  3Comments

gmile picture gmile  路  3Comments

jamesstidard picture jamesstidard  路  4Comments

robsonpeixoto picture robsonpeixoto  路  4Comments