1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00

fix(std/log): use writeAllSync instead of writeSync (#5868)

Deno.writeSync:
Returns the number of bytes written. 
It is not guaranteed that the full buffer will be written in a single call.
This commit is contained in:
zfx 2020-05-26 21:54:30 +08:00 committed by GitHub
parent f462f7fe54
commit 24c36fd862
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,7 +125,7 @@ export class FileHandler extends WriterHandler {
}
log(msg: string): void {
Deno.writeSync(this._file.rid, this.#encoder.encode(msg + "\n"));
Deno.writeAllSync(this._file, this.#encoder.encode(msg + "\n"));
}
destroy(): Promise<void> {