Skip to content

Commit

Permalink
Fix package version collection for Alpine
Browse files Browse the repository at this point in the history
The apk command to collect version information for Alpine packages was
collecting the package name and version instead of just the isolated
version string. This was causing Tern's output file to report the
package as pkgname-pkgname-version. This commit fixes the version
command under the apk package manager section in base.yml to only
collect the package version information.

Resolves tern-tools#758

Signed-off-by: Rose Judge <rjudge@vmware.com>
  • Loading branch information
rnjudge committed Jul 9, 2020
1 parent 56a9a7a commit 044dc47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tern/command_lib/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ apk:
container:
# use double quotes when using awk
- "pkgs=`apk info 2>/dev/null`"
- "for p in $pkgs; do apk info $p 2>/dev/null | head -1 | awk '{print $1}'; done"
- "for p in $pkgs; do lic=`apk info $p 2>/dev/null | head -1 | awk '{print $1}'`; echo $lic | awk -F \"${p}-\" '{print $2}'; done"
delimiter: "\n"
licenses:
invoke:
Expand Down

0 comments on commit 044dc47

Please sign in to comment.