asdf plugin-test are not getting the lasted version

Created on 22 Jun 2019  路  4Comments  路  Source: asdf-vm/asdf

Steps to reproduce

asdf plugin-test elixir [email protected]:asdf-vm/asdf-elixir.git 'elixir --version'

Expected behavior

Should install the version 1.9.0-rc.0 and show the output:

Erlang/OTP 22 [erts-10.4.3] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe] [dtrace]

Elixir 1.9.0-rc.0 (aad7aa4) (compiled with Erlang/OTP 20)

Actual behavior

Is installing the version 0.7.2

==> Checking whether specified Elixir release/reference exists...
==> Downloading 0.7.2 to /var/folders/kt/t5835zxn58v90p4tlzk2dm840000gn/T//elixir-precompiled-0.7.2.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   243  100   243    0     0   1116      0 --:--:-- --:--:-- --:--:--  1114
==> Copying release into place
[/var/folders/kt/t5835zxn58v90p4tlzk2dm840000gn/T//elixir-precompiled-0.7.2.zip]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /var/folders/kt/t5835zxn58v90p4tlzk2dm840000gn/T//elixir-precompiled-0.7.2.zip or
        /var/folders/kt/t5835zxn58v90p4tlzk2dm840000gn/T//elixir-precompiled-0.7.2.zip.zip, and cannot find /var/folders/kt/t5835zxn58v90p4tlzk2dm840000gn/T//elixir-precompiled-0.7.2.zip.ZIP, period.
FAILED: install exited with an error


Environment

OS: macOS 10.14.5

asdf version: v0.7.2

Most helpful comment

Just for reference, now that #575 has been merged maybe the plugin-test command could make use of it to use the latest version.

All 4 comments

Thanks for reporting.
I think we should improve how we choose the version to install.
We could start by searching for the highest version respecting semver. If it exists we install it, if not we fallback to the last version returned by list-all.
If somebody would like to help on this one it would be great!

The documentation for creating plugins says plugin-test installs the last listed version. In my case the versions are actually dates, and it picks the first listed version instead.

I have same issue.

Just for reference, now that #575 has been merged maybe the plugin-test command could make use of it to use the latest version.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gmile picture gmile  路  3Comments

Quintasan picture Quintasan  路  5Comments

niksfirefly picture niksfirefly  路  3Comments

jamesstidard picture jamesstidard  路  4Comments

tomsquest picture tomsquest  路  4Comments