license scanner fails with ASDF_DOWNLOAD_PATH: unbound variable
Summary
Customer contacted GitLab support about the license scanner failing to run against one of their repositories. GitLab team members can read more in the ticket.
yarn
is failing to install, and the cause seems to be that ASDF_DOWNLOAD_PATH
is not set (unbound variable
)
bin/install
source does this:
NODE_BUILD_BUILD_PATH="$ASDF_DOWNLOAD_PATH" NODE_BUILD_CACHE_PATH="$ASDF_DOWNLOAD_PATH" \
nodebuild_wrapped ${args+"${args[@]}"} "$version" "$install_path"
}
#329542 (closed) is similar - yarn failing to install, but the reason is different.
Did not find any significant hits searching issues, code, comments etc., except here in license-finder:/config/software/asdf.rb
# TODO: temporary fix to support version of asdf < 0.8.0 due to lack of ASDF_DOWNLOAD_PATH usage
Steps to reproduce
unknown
Example Project
What is the current bug behavior?
What is the expected correct behavior?
Relevant logs and/or screenshots
$ /run.sh analyze .
Selecting previously unselected package asdf.
(Reading database ... 19561 files and directories currently installed.)
Preparing to unpack .../asdf_0.7.8-1_amd64.deb ...
Unpacking asdf (0.7.8-1) ...
Setting up asdf (0.7.8-1) ...
Added development to the ignored groups
Added develop to the ignored groups
Added test to the ignored groups
license_management report --prepare-no-fail --format=json --save=gl-license-scanning-report.json --no-recursive --no-debug
LicenseFinder::NPM: is active
LicenseFinder::Yarn: is active
[v3.31.4] version 16.11.1 is not installed for nodejs
Updating nodejs...
From https://github.com/asdf-vm/asdf-nodejs
794b653..ed34355 master -> master
794b653..ed34355 master -> origin/master
Already on 'master'
Your branch is up to date with 'origin/master'.
Cloning node-build...
/opt/asdf/plugins/nodejs/bin/install: line 52: ASDF_DOWNLOAD_PATH: unbound variable
version 16.11.1 is not installed for nodejs
unknown command: yarn. Perhaps you have to reshim?
LicenseFinder::Yarn: is not installed
Output of checks
GitLab 14.5.2 Self-managed
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)