diff --git a/.github/workflows/npm-cd.yml b/.github/workflows/npm-cd.yml index c0ffa2fdd8..6be1180f00 100644 --- a/.github/workflows/npm-cd.yml +++ b/.github/workflows/npm-cd.yml @@ -164,8 +164,9 @@ jobs: npm pkg fix set +e # 2>&1 1>&3- redirects stderr to stdout and then redirects the original stdout to another file descriptor, - # effectively separating stderr and stdout. The 3>&1 at the end redirects the original stdout back to the console. - { npm_publish_err=$(npm publish --tag ${{ env.NPM_TAG }} --access public 2>&1 1>&3-) ;} 3>&1 + # effectively separating stderr and stdout. The 3>&1 at the end redirects the original stdout back to the console. + # https://github.com/npm/npm/issues/118#issuecomment-325440 - ignoring notice messages since currentlly they are directed to stderr + { npm_publish_err=$(npm publish --tag ${{ env.NPM_TAG }} --access public 2>&1 1>&3- | grep -v "notice") ;} 3>&1 if [[ "$npm_publish_err" == *"You cannot publish over the previously published versions"* ]] then echo "Skipping publishing, package already published"