Skip to content

Commit c7503fe

Browse files
committed
fixing problem with the getDockerEnv() function that was causing WIT-related problems on Linux
1 parent 20ce92a commit c7503fe

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

electron/app/js/imageBuilderUtils.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright (c) 2021, 2022, Oracle and/or its affiliates.
44
* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
55
*/
6+
const path = require('path');
67
const fsUtils = require('./fsUtils');
78
const { getLogger } = require('./wktLogging');
89
const { getHttpsProxyUrl, getBypassProxyHosts } = require('./userSettings');
@@ -144,16 +145,16 @@ async function doPushImage(currentWindow, stdoutChannel, stderrChannel, imageBui
144145
}
145146

146147
function getDockerEnv(httpsProxyUrl, bypassProxyHosts, imageBuilderOptions) {
147-
let path = process.env.PATH;
148+
let parentPath = process.env.PATH;
148149
if (imageBuilderOptions && imageBuilderOptions.extraPathDirectories) {
149150
const extraPathDirectories = imageBuilderOptions.extraPathDirectories.join(path.delimiter);
150-
path += `${path.delimiter}${extraPathDirectories}`;
151+
parentPath += `${path.delimiter}${extraPathDirectories}`;
151152
}
152153

153154
let env = {
154155
DOCKER_BUILDKIT: '0',
155156
// podman relies on the PATH including other executables (e.g., newuidmap)...
156-
PATH: path
157+
PATH: parentPath
157158
};
158159

159160
// Docker-specific environment variables that should be passed on

electron/app/js/witCache.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const { getLogger } = require('./wktLogging');
1010
const { getImagetoolShellScript } = require('./wktTools');
1111
const { executeScriptCommand } = require('./childProcessExecutor');
1212

13-
/* global process */
1413
async function cacheInstallers(cacheConfig) {
1514
const results = {
1615
isSuccess: true
@@ -105,8 +104,7 @@ async function executeCacheCommand(javaHome, installerType, installerPath, insta
105104
`--version=${installerVersion}`
106105
];
107106
const env = {
108-
JAVA_HOME: javaHome,
109-
PATH: process.env.PATH
107+
JAVA_HOME: javaHome
110108
};
111109

112110
const result = {

0 commit comments

Comments
 (0)