Skip to content

Commit

Permalink
fix: after dockerode update
Browse files Browse the repository at this point in the history
  • Loading branch information
nugaon committed Mar 2, 2024
1 parent d8a467d commit a0fb29f
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/utils/docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,25 +316,16 @@ export class Docker {
}
}

public async logs(
target: ContainerType,
outputStream: NodeJS.WriteStream,
follow = false,
tail?: number,
): Promise<void> {
public async logs(target: ContainerType, outputStream: NodeJS.WriteStream, tail?: number): Promise<void> {
const { container } = await this.findContainer(this.getContainerName(target))

if (!container) {
throw new Error('Queen container does not exists, even though it should have had!')
}

const logs = await container.logs({ stdout: true, stderr: true, follow, tail })
const logs = await container.logs({ stdout: true, stderr: true, tail })

if (!follow) {
outputStream.write(logs as unknown as Buffer)
} else {
logs.pipe(outputStream)
}
outputStream.write(logs as unknown as Buffer)
}

public async stopAll(allWithPrefix = false, deleteContainers = false): Promise<void> {
Expand Down

0 comments on commit a0fb29f

Please sign in to comment.