Skip to content

Commit

Permalink
fix: standard
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyguerra committed Aug 14, 2024
1 parent 5ae96d4 commit 93b5583
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/adapters/Shell.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ class Shell extends Adapter {
await this.receive(message)
this.#rl.prompt()
})

this.#rl.on('history', async (history) => {
if (history.length === 0) return
await fs.promises.appendFile(historyPath, `${history[0]}\n`)
})

let existingHistory = (await fs.promises.readFile(historyPath, 'utf8')).split('\n')
const existingHistory = (await fs.promises.readFile(historyPath, 'utf8')).split('\n')
existingHistory.forEach(line => this.#rl.history.push(line))

try {
Expand Down

0 comments on commit 93b5583

Please sign in to comment.