Skip to content

fixing problem with the getDockerEnv() function that was causing WIT-related problems on Linux #147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions electron/app/js/imageBuilderUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions electron/app/js/witCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 = {
Expand Down