aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.');