diff --git a/electron/app/js/imageBuilderUtils.js b/electron/app/js/imageBuilderUtils.js index cd4cd4e1a..28b358ad7 100644 --- a/electron/app/js/imageBuilderUtils.js +++ b/electron/app/js/imageBuilderUtils.js @@ -3,6 +3,7 @@ * Copyright (c) 2021, 2022, Oracle and/or its affiliates. * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. */ +const path = require('path'); const fsUtils = require('./fsUtils'); const { getLogger } = require('./wktLogging'); const { getHttpsProxyUrl, getBypassProxyHosts } = require('./userSettings'); @@ -144,16 +145,16 @@ async function doPushImage(currentWindow, stdoutChannel, stderrChannel, imageBui } function getDockerEnv(httpsProxyUrl, bypassProxyHosts, imageBuilderOptions) { - let path = process.env.PATH; + let parentPath = process.env.PATH; if (imageBuilderOptions && imageBuilderOptions.extraPathDirectories) { const extraPathDirectories = imageBuilderOptions.extraPathDirectories.join(path.delimiter); - path += `${path.delimiter}${extraPathDirectories}`; + parentPath += `${path.delimiter}${extraPathDirectories}`; } let env = { DOCKER_BUILDKIT: '0', // podman relies on the PATH including other executables (e.g., newuidmap)... - PATH: path + PATH: parentPath }; // Docker-specific environment variables that should be passed on diff --git a/electron/app/js/witCache.js b/electron/app/js/witCache.js index 853e49d4d..8d91eb768 100644 --- a/electron/app/js/witCache.js +++ b/electron/app/js/witCache.js @@ -10,7 +10,6 @@ const { getLogger } = require('./wktLogging'); const { getImagetoolShellScript } = require('./wktTools'); const { executeScriptCommand } = require('./childProcessExecutor'); -/* global process */ async function cacheInstallers(cacheConfig) { const results = { isSuccess: true @@ -105,8 +104,7 @@ async function executeCacheCommand(javaHome, installerType, installerPath, insta `--version=${installerVersion}` ]; const env = { - JAVA_HOME: javaHome, - PATH: process.env.PATH + JAVA_HOME: javaHome }; const result = {