Skip to content

Instantly share code, notes, and snippets.

@t1m0thyj
Created March 16, 2022 19:40
Show Gist options
  • Save t1m0thyj/73e501332b38cae37f1213b246434b8a to your computer and use it in GitHub Desktop.
Save t1m0thyj/73e501332b38cae37f1213b246434b8a to your computer and use it in GitHub Desktop.
#!/bin/bash
set -ex
npmRegistry=$1
tempDir=$(mktemp -d)
cd $tempDir
[[ ! -z "$npmRegistry" ]] && echo "@zowe:registry=$npmRegistry" >> .npmrc
npm init -y
npm install @zowe/cli
ls node_modules # Only one dependency should be at top level (@zowe/cli)
grep flatted node_modules/@zowe/cli/npm-shrinkwrap.json
npm list flatted # Installed version should match shrinkwrap (3.2.4)
rm -rf $tempDir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment