Skip to content

Commit

Permalink
fix(midway-init): Internal employees can not use the external ne… (mi…
Browse files Browse the repository at this point in the history
…dwayjs#253)

fix(midway-init): Internal employees can not use the external network…
  • Loading branch information
czy88840616 authored Jun 30, 2019
2 parents 5a841c1 + 3179434 commit ce4b9fb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/midway-init/bin/midway-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ co(function* () {
// 判断是否处于内网环境
function isInternal() {
try {
const { stdout } = childProcess.spawnSync('tnpm', [ 'view', '@ali/midway-init', '--json' ]);
const { stdout } = childProcess.spawnSync('tnpm', [ 'view', '@ali/midway-init', '--json'], {
timeout: 3000
});

const npmData = JSON.parse(stdout.toString(), null, 2);

if (npmData.name === '@ali/midway-init') {
Expand Down

0 comments on commit ce4b9fb

Please sign in to comment.