Skip to content

Commit

Permalink
add 0s when following log
Browse files Browse the repository at this point in the history
  • Loading branch information
kla committed Dec 1, 2024
1 parent 5b51d4d commit 0ab9c6f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ export default class Container {
async logs(options: { follow?: boolean, tail?: number, since?: string } = {}) {
let command = `logs ${this.name}`

if (options.follow) command += ' --follow'
if (options.follow) {
command += ' --follow'
options.since ||= '0s'
}

if (options.tail) command += ` --tail=${options.tail}`
if (!options.since) options.since = '10m'
if (options.since) command += ` --since=${options.since}`
Expand Down

0 comments on commit 0ab9c6f

Please sign in to comment.