From 05a9e5899759d414e9bf2291be3366975b9972a7 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Mon, 11 Jan 2021 13:54:15 -0800 Subject: [PATCH] Fix null when there is no .licenses found. Signed-off-by: Troy Dawson --- nodejs-packaging-bundler | 1 + 1 file changed, 1 insertion(+) diff --git a/nodejs-packaging-bundler b/nodejs-packaging-bundler index 18be72b..0dd61d7 100755 --- a/nodejs-packaging-bundler +++ b/nodejs-packaging-bundler @@ -61,6 +61,7 @@ fi echo "LICENSES IN BUNDLE:" find . -name "package.json" -exec jq .license {} \; >> ${TMP_DIR}/${PACKAGE}-${VERSION}-bundled-licenses.txt find . -name "package.json" -exec jq '.licenses[] .type' {} \; >> ${TMP_DIR}/${PACKAGE}-${VERSION}-bundled-licenses.txt 2>/dev/null +sed -i "/^null$/d" ${TMP_DIR}/${PACKAGE}-${VERSION}-bundled-licenses.txt sort -u -o ${TMP_DIR}/${PACKAGE}-${VERSION}-bundled-licenses.txt ${TMP_DIR}/${PACKAGE}-${VERSION}-bundled-licenses.txt echo " Downloading dev dependencies" npm install --no-optional --only=dev