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

Terminal Fonksiyonu Eklendi

üst d0b6bdae
import { Deeplink } from "electron-deeplink";
const { exec } = require("child_process");
const handler = (app, mainWindow, isDevelopment) => {
const deeplink = new Deeplink({
......@@ -8,7 +9,24 @@ const handler = (app, mainWindow, isDevelopment) => {
});
deeplink.on("received", link => {
console.log(link);
link = link.split("://")[1].split("/");
const func = link[0],
container = link[1];
if (["viewer", "terminal"].indexOf(func) === -1) {
return;
}
if (func === "terminal") {
if (process.platform === "win32") {
exec(`start cmd.exe /c docker exec -it ${container} sh`);
} else {
exec(`docker exec -it ${container} sh`);
}
}
console.log(func);
console.log(container);
});
};
module.exports = handler;
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