fix(core): update
This commit is contained in:
@ -3,6 +3,8 @@ import * as plugins from './mod.plugins';
|
||||
import { bash } from '../npmci.bash';
|
||||
import { repo } from '../npmci.env';
|
||||
|
||||
import { configObject } from '../npmci.config';
|
||||
|
||||
/**
|
||||
* handle cli input
|
||||
* @param argvArg
|
||||
@ -15,10 +17,10 @@ export let handleCli = async argvArg => {
|
||||
await mirror();
|
||||
break;
|
||||
default:
|
||||
logger.log('error', `>>npmci git ...<< action >>${action}<< not supported`);
|
||||
logger.log('error', `npmci git -> action >>${action}<< not supported!`);
|
||||
}
|
||||
} else {
|
||||
logger.log('info', `>>npmci git ...<< cli arguments invalid... Please read the documentation.`);
|
||||
logger.log('info', `npmci git -> cli arguments invalid! Please read the documentation.`);
|
||||
}
|
||||
};
|
||||
|
||||
@ -26,6 +28,10 @@ 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) {
|
||||
logger.log('warn', `refusing to mirror due to private property`);
|
||||
return;
|
||||
}
|
||||
if (githubToken) {
|
||||
logger.log('info', 'found github token.');
|
||||
logger.log('info', 'attempting the mirror the repository to GitHub');
|
||||
|
Reference in New Issue
Block a user