diff --git a/src/const.ts b/src/const.ts index e440c18..ab573e7 100755 --- a/src/const.ts +++ b/src/const.ts @@ -3,7 +3,9 @@ import os from "os"; import path from "path"; -const PTY_PATH = path.normalize(path.join(process.cwd(), "lib", os.platform() === "win32" ? "pty.exe" : "pty")); +const ptyName = `pty_${os.platform()}_${os.arch()}${os.platform() === "win32" ? ".exe" : ""}`; + +const PTY_PATH = path.normalize(path.join(process.cwd(), "lib", ptyName)); const FILENAME_BLACKLIST = ["\\", "/", ".", "'", '"', "?", "*", "<", ">"]; diff --git a/src/entity/commands/pty/pty_start.ts b/src/entity/commands/pty/pty_start.ts index 3088804..b8a960a 100755 --- a/src/entity/commands/pty/pty_start.ts +++ b/src/entity/commands/pty/pty_start.ts @@ -104,11 +104,6 @@ export default class PtyStartCommand extends InstanceCommand { checkPtyEnv = false; } - if ((os.platform() !== "linux" && os.platform() !== "win32") || os.arch() !== "x64") { - instance.println("ERROR", $t("pty_start.notSupportPty")); - checkPtyEnv = false; - } - if (checkPtyEnv === false) { // Close the PTY type, reconfigure the instance function group, and restart the instance instance.config.terminalOption.pty = false;