Kaydet (Commit) de97f352 authored tarafından Eda Altuntaş's avatar Eda Altuntaş

Bug Fix

üst 7ff53935
const { ipcMain } = require("electron");
const { exec } = require("child_process");
const { spawn } = require("child_process");
const handler = () => {
ipcMain.on("terminal", (_, data) => {
if (process.platform === "win32") {
exec("start", ["cmd", "/c", "docker", "exec", "-it", data, "sh"]);
spawn("start", ["cmd", "/c", "docker", "exec", "-it", data, "sh"]);
} else {
exec("exo-open", [
spawn("exo-open", [
"--launch",
"TerminalEmulator",
"docker",
......@@ -19,9 +19,9 @@ const handler = () => {
});
ipcMain.on("viewer", (_, data) => {
if (process.platform === "win32") {
exec("virt-viewer", [`spice://localhost:${data}`]);
spawn("virt-viewer", [`spice://localhost:${data}`]);
} else {
exec("remote-viewer", [`spice://localhost:${data}`]);
spawn("remote-viewer", [`spice://localhost:${data}`]);
}
});
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment