Only prepend asdf paths in case asdf is enabled

What does this merge request do and why?

Given you have asdf installed

When you opt out of asdf in the gdk

Then the PATH variable should not be prepended with asdf paths

How to set up and validate locally

  1. Disable asdf: gdk config get asdf.opt_out true
  2. Create a directory ~/not-working/shims
  3. Create a file:
    {
      echo '#!/usr/bin/env bash'
      echo ''
      echo 'echo "I do not work"'
      echo 'exit 1'
    } > ~/not-working/shims/gem
  4. Make it executable: chmod a+x ~/not-working/shims/gem
  5. export ASDF_DATA_DIR="~/not-working"
  6. Run make platform-update-timed

Before the above should fail, afterwards it should be alright.

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Lukas Eipert

Merge request reports

Loading