Skip to content

Commit fef9650

Browse files
committed
fixing a podman-related issue where it relies on the PATH environment variable including the directory where other executables are located
1 parent fce61c4 commit fef9650

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

electron/app/js/imageBuilderUtils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ async function doPushImage(currentWindow, stdoutChannel, stderrChannel, imageBui
137137

138138
function getDockerEnv(httpsProxyUrl, bypassProxyHosts) {
139139
let env = {
140-
DOCKER_BUILDKIT: '0'
140+
DOCKER_BUILDKIT: '0',
141+
// podman relies on the PATH including other executables (e.g., newuidmap)...
142+
PATH: process.env.PATH
141143
};
142144

143145
if (httpsProxyUrl) {

electron/app/js/kubectlUtils.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,13 +601,14 @@ async function apply(kubectlExe, fileData, options) {
601601
}
602602

603603
function getKubectlEnvironment(options, httpsProxyUrl, bypassProxyHosts) {
604-
const env = {};
604+
const env = {
605+
PATH: process.env.PATH
606+
};
605607
if (options) {
606608
if (options.kubeConfig && Array.isArray(options.kubeConfig) && options.kubeConfig.length > 0) {
607609
env['KUBECONFIG'] = options.kubeConfig.join(path.delimiter);
608610
getLogger().debug('Set KUBECONFIG environment variable to %s', env['KUBECONFIG']);
609611
}
610-
env['PATH'] = process.env.PATH;
611612
if (options.extraPathDirectories && Array.isArray(options.extraPathDirectories) && options.extraPathDirectories.length > 0) {
612613
env['PATH'] = env['PATH'] + path.delimiter + options.extraPathDirectories.join(path.delimiter);
613614
}

0 commit comments

Comments
 (0)