pxnpm 3.0.0-0 → 3.0.0-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/config.js +3 -2
- package/package.json +1 -1
package/lib/config.js
CHANGED
|
@@ -93,6 +93,8 @@ const timeout = 3000;
|
|
|
93
93
|
const { success: is } = ping.test(outerAddr.inner.proxy.host, outerAddr.inner.proxy.port, timeout); // registry
|
|
94
94
|
const { success: os } = ping.test(outerAddr.outer.proxy.host, outerAddr.outer.proxy.port, timeout); // proxy
|
|
95
95
|
|
|
96
|
+
let proxy = '';
|
|
97
|
+
|
|
96
98
|
if (!is && !os) {
|
|
97
99
|
// consola.fatal('没有发现安装源,请调通网络,或重新尝试安装');
|
|
98
100
|
// process.exit(0);
|
|
@@ -106,10 +108,9 @@ if (!is && os) {
|
|
|
106
108
|
|
|
107
109
|
if (is && !os) {
|
|
108
110
|
addr = getAddr("inner");
|
|
109
|
-
|
|
111
|
+
proxy = addr.proxy;
|
|
110
112
|
}
|
|
111
113
|
|
|
112
|
-
let proxy = addr.proxy;
|
|
113
114
|
let registry = addr.registry;
|
|
114
115
|
|
|
115
116
|
const userconfig = path.join(root, '.pxnpmrc');
|