Skip to content

Commit

Permalink
fix(midway-init): Internal employees can not use the external network…
Browse files Browse the repository at this point in the history
… midway
  • Loading branch information
rccoder committed Jun 30, 2019
1 parent 5a841c1 commit 3179434
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 3179434

Please sign in to comment.