From 2c83d402fc17b067403436ff03fcbf29c58059d6 Mon Sep 17 00:00:00 2001 From: sebseb7 Date: Tue, 12 Aug 2025 00:49:12 +0200 Subject: [PATCH] Update example.js to add multiple terminal inputs and extend timeout duration. Modify stat-vit-term.js to adjust shell arguments for improved compatibility. --- src/example.js | 7 ++++++- src/stat-vit-term.js | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/example.js b/src/example.js index c26e88a..bf86957 100644 --- a/src/example.js +++ b/src/example.js @@ -26,11 +26,16 @@ termSession.on('ready', () => { setTimeout(() => { console.log('\n--- Ping abbrechen mit ^C ---'); termSession.input('^C'); + + termSession.input("sdfsdfsdaf\n"); + termSession.input("\n"); + termSession.input("\n"); + termSession.input("\n"); }, 3000); // Nach 4 Sekunden beenden setTimeout(() => { console.log('\n--- Terminal beenden ---'); termSession.kill(); - }, 4000); + }, 40000000); }); \ No newline at end of file diff --git a/src/stat-vit-term.js b/src/stat-vit-term.js index 211d684..1a5a282 100644 --- a/src/stat-vit-term.js +++ b/src/stat-vit-term.js @@ -24,7 +24,7 @@ class StatVitTerm extends EventEmitter { _init() { try { // Wichtige Änderung: Shell im richtigen Modus starten - const args = process.platform === 'win32' ? [] : ['-i', '-l']; // login shell + const args = process.platform === 'win32' ? [] : ['-l']; // login shell this.process = spawn(this.options.shell, args, { stdio: ['pipe', 'pipe', 'pipe'], cwd: this.options.cwd,