diff --git a/ts/mod_git/index.ts b/ts/mod_git/index.ts index eb5ce3f..3dc79a7 100644 --- a/ts/mod_git/index.ts +++ b/ts/mod_git/index.ts @@ -28,8 +28,11 @@ export let mirror = async () => { const githubToken = process.env.NPMCI_GIT_GITHUBTOKEN; const githubUser = process.env.NPMCI_GIT_GITHUBGROUP || repo.user; const githubRepo = process.env.NPMCI_GIT_GITHUB || repo.repo; - if(configObject.projectInfo.npm.packageJson.private === true) { - logger.log('warn', `refusing to mirror due to private property`); + if( + configObject.projectInfo.npm.packageJson.private === true || + configObject.npmAccessLevel === 'private' + ) { + logger.log('warn', `refusing to mirror due to private property use a private mirror location instead`); return; } if (githubToken) {