Skip to content
Open
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
10 changes: 8 additions & 2 deletions src/oci_image/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function execSyft(imageRef, opts = {}) {
function getSyftEnvs(dockerPath, podmanPath) {
let path = null;
if (dockerPath && podmanPath) {
path = `${dockerPath}${File.pathSeparator}${podmanPath}`;
path = `${dockerPath}${delimiter}${podmanPath}`;
} else if (dockerPath) {
path = dockerPath;
} else if (podmanPath) {
Expand Down Expand Up @@ -302,7 +302,13 @@ function podmanGetVariant(opts = {}) {
* @returns {string} - The information
*/
function dockerPodmanInfo(dockerSupplier, podmanSupplier, opts = {}) {
return dockerSupplier(opts) || podmanSupplier(opts);
try {
const result = dockerSupplier(opts);
if (result) { return result; }
} catch (_) {
// docker not available, fall through to podman
}
return podmanSupplier(opts);
}

/**
Expand Down
Loading