Skip to content

Commit

Permalink
Apparently order is a thing
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottkember committed Jun 18, 2022
1 parent eef273d commit f8f3333
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/main/utils/flash.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@ const cwd = () => {
: path?.join(rootPath, "builder");
};

const python = () => {
let python = "/usr/bin/python3";

if (!fs.existsSync(python) && fs.existsSync("/usr/bin/python3")) {
python = "/usr/bin/python3";
}

if (remote.require("os").platform() !== "darwin") {
python = "python";
}

return python;
};

// Flashing

/** Get a progress percentage from a USB flash serial output */
Expand Down Expand Up @@ -59,20 +73,6 @@ if (isElectron()) {
}
}

const python = () => {
let python = "/usr/bin/python3";

if (!fs.existsSync(python) && fs.existsSync("/usr/bin/python3")) {
python = "/usr/bin/python3";
}

if (remote.require("os").platform() !== "darwin") {
python = "python";
}

return python;
};

/** Flash a build file to a USB output */
export const flashBuild = async (port, file, progressCallback) => {
let errorOutput = [];
Expand Down

0 comments on commit f8f3333

Please sign in to comment.