Skip to content

Commit 0c83ee4

Browse files
committed
Fix proxy wildcard check
1 parent 896f05d commit 0c83ee4

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

package/oracledbinstall.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,14 @@ function getProxyConfig(hostname) {
9494
process.env.no_PROXY ||
9595
process.env.no_proxy;
9696

97-
if (noProxy && noProxy !== '*') {
97+
if (noProxy === '*') {
98+
packageUtil.trace('noProxy wildcard');
99+
proxyConfig.useProxy = false;
100+
proxyConfig.hostname = undefined;
101+
proxyConfig.hostname = undefined;
102+
} else if (noProxy) {
98103
const noProxies = noProxy.toLowerCase().split(',');
104+
packageUtil.trace('noProxy', noProxies);
99105

100106
if (noProxies.indexOf(hostname.toLowerCase()) > -1) {
101107
proxyConfig.useProxy = false;
@@ -112,7 +118,7 @@ function getProxyConfig(hostname) {
112118
function verifyBinary() {
113119
return new Promise((resolve, reject) => {
114120
packageUtil.trace('In verifyBinary');
115-
packageUtil.trace('Checking for binary at ', packageUtil.BINARY_PATH_LOCAL);
121+
packageUtil.trace('Checking for binary at', packageUtil.BINARY_PATH_LOCAL);
116122
packageUtil.log('Verifying installation');
117123

118124
if (!fs.existsSync(packageUtil.BINARY_PATH_LOCAL)) {
@@ -226,7 +232,7 @@ function getFileReadStreamByProxy(hostname, path, proxyHostname, proxyPort) {
226232
// file read stream.
227233
function getFileReadStreamBase(hostname, path, socket, agent) {
228234
return new Promise((resolve, reject) => {
229-
packageUtil.trace('In getFileReadStreamBase', hostname, path, socket, agent);
235+
packageUtil.trace('In getFileReadStreamBase', hostname, path);
230236

231237
let settled = false;
232238

@@ -417,7 +423,7 @@ function install() {
417423

418424
packageUtil.log('Beginning installation');
419425

420-
verifyBinary()
426+
verifyBinary() // check if download is necessary for 'npm rebuild'
421427
.then((valid) => {
422428
if (valid) {
423429
done(null, true);

0 commit comments

Comments
 (0)