Skip to content

Commit

Permalink
fix: define history file path for repl history
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Jul 20, 2023
1 parent 88ffa2c commit 27b8a16
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion providers/repl_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* file that was distributed with this source code.
*/

import { join } from 'node:path'
import { homedir } from 'node:os'
import type { ApplicationService } from '../src/types.js'

export default class ReplServiceProvider {
Expand All @@ -18,7 +20,9 @@ export default class ReplServiceProvider {
register() {
this.app.container.singleton('repl', async () => {
const { Repl } = await import('../modules/repl.js')
return new Repl()
return new Repl({
historyFilePath: join(homedir(), '.adonisjs_v6_repl_history'),
})
})
}

Expand Down

0 comments on commit 27b8a16

Please sign in to comment.