aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-04-24 09:32:44 +0800
committerFabio Berger <me@fabioberger.com>2018-04-24 09:32:44 +0800
commita3cc5c1dd7e88aea50859560f7d751435cb577bd (patch)
treea805950f15bcfd757a98913402a445bd2712653b /packages/monorepo-scripts/src
parent1f82c7eadfe9e9cddb56b40562a2f0f69cc7dfd9 (diff)
downloaddexon-0x-contracts-a3cc5c1dd7e88aea50859560f7d751435cb577bd.tar.gz
dexon-0x-contracts-a3cc5c1dd7e88aea50859560f7d751435cb577bd.tar.zst
dexon-0x-contracts-a3cc5c1dd7e88aea50859560f7d751435cb577bd.zip
Add hack comment about the use of sudo
Diffstat (limited to 'packages/monorepo-scripts/src')
-rw-r--r--packages/monorepo-scripts/src/publish.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts
index 6c728467a..0ca3ea7a1 100644
--- a/packages/monorepo-scripts/src/publish.ts
+++ b/packages/monorepo-scripts/src/publish.ts
@@ -116,6 +116,8 @@ package.ts. Please add an entry for it and try again.`,
async function checkPublishRequiredSetupAsync(): Promise<boolean> {
// check to see if logged into npm before publishing
try {
+ // HACK: for some reason on some setups, the `npm whoami` will not recognize a logged-in user
+ // unless run with `sudo` (i.e Fabio's NVM setup) but is fine for others (Jacob's N setup).
await execAsync(`sudo npm whoami`);
} catch (err) {
utils.log('You must be logged into npm in the commandline to publish. Run `npm login` and try again.');