Skip to content

Commit fe6d1e7

Browse files
committed
publish: set registry log
1 parent 84ef15d commit fe6d1e7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/publish.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,17 @@ export async function publish(args) {
6969
const env = {
7070
...process.env,
7171
NPM_TOKEN: args.accessToken || undefined,
72-
// NPM_CONFIG_REGISTRY: (args.registry || 'https://registry.npmjs.org/'),
72+
NPM_CONFIG_REGISTRY: (args.registry || 'https://registry.npmjs.org/'),
7373
}
7474

7575
// set config
7676
const registryUrlWithoutScheme = (args.registry || 'https://registry.npmjs.org/').replace(/https?:\/\//, '');
7777
const configCmd = `npm config set //${registryUrlWithoutScheme}:_authToken ${env.NPM_TOKEN}`;
78-
execSync(configCmd);
78+
logger.info(`Setting npm config to registry //${registryUrlWithoutScheme}`);
79+
execSync(configCmd, {
80+
cwd: packageDirectory,
81+
env
82+
});
7983

8084

8185
let packageVersionPublished = null;

0 commit comments

Comments
 (0)