Skip to content

Explicitly ignore comments in .tool-versions

Phil Zona requested to merge philbz-master-patch-21489 into master

What does this Merge Request do?

This change causes the install_prerequisites script to explicitly ignore commented lines in the .tool-versions file when installing asdf addons.

I was trying to reinstall GDK and got some really strange output:

▶ make bootstrap
asdf plugin add #
plugin # not found in repository
asdf plugin add #
plugin # not found in repository
asdf plugin add #
plugin # not found in repository
asdf plugin add #
plugin # not found in repository
asdf plugin add #
plugin # not found in repository
asdf plugin add #
plugin # not found in repository
asdf plugin add #
plugin # not found in repository
asdf plugin add #
plugin # not found in repository
make: *** [install-prerequisites] Error 1

Looking through the scripts I pretty quickly realized the #s to indicate comments were being parsed as plugin names, so I added this step to remove them.

Presumably there's something weird about my system that would cause comments not to be ignored, but I don't imagine this change would break things for anyone else since it's just being explicit about ignoring those lines. If anyone knows why it was reading the comments that way to begin with, I'd love to know :)

I confirmed that my change allows the bootstrap script to run as intended:

~/gitlab-development-kit  master ✗ ruby-2.6.6                                                                                                                                                            3h49m ⚑  ⍉
▶ make bootstrap
golang 1.14.6 is already installed
golang 1.15.1 is already installed
minio 2020-08-27T05-16-20Z is already installed
minio 2020-07-27T18-37-02Z is already installed
nodejs 12.18.3 is already installed
postgres 11.9 is already installed
postgres 11.8 is already installed
redis 6.0.7 is already installed
redis 6.0.6 is already installed
ruby 2.6.6 is already installed
yarn 1.22.5 is already installed
yarn 1.22.4 is already installed
Successfully installed bundler-1.17.3
Parsing documentation for bundler-1.17.3
Done installing documentation for bundler after 2 seconds
1 gem installed
Successfully installed gitlab-development-kit-0.2.8
Parsing documentation for gitlab-development-kit-0.2.8
Done installing documentation for gitlab-development-kit after 0 seconds
1 gem installed

Merge Request checklist

  • Tests added for new functionality. If not, please raise Issue to follow-up.
  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Documentation added/updated, if needed.
  • gdk doctor test added, if needed.
Edited by Phil Zona

Merge request reports

Loading