This commit is contained in:
xiaojunnuo
2025-09-05 18:08:23 +08:00
parent cdd2816642
commit 4f39cb8dfa
2 changed files with 4 additions and 2 deletions

View File

@@ -469,7 +469,8 @@ export class SshClient {
async isCmd(conn: AsyncSsh2Client) {
const spec = await conn.exec("echo %COMSPEC% ");
if (spec.toString().trim() === "%COMSPEC%") {
const ret = spec.toString().trim();
if (ret.includes("%COMSPEC%") && !ret.includes("echo %COMSPEC%")) {
return false;
} else {
return true;