mirror of
https://github.com/denoland/deno.git
synced 2025-08-02 18:12:39 +00:00
fix(fs): instanceof check for Deno.FsFile (#22121)
Regression caused by https://github.com/denoland/deno/pull/22072. I added a relevant test so we don't regress again. Fixes https://github.com/denoland/deno/issues/22115
This commit is contained in:
parent
7038074c85
commit
0b0fb94ce2
11 changed files with 49 additions and 31 deletions
|
@ -21,6 +21,7 @@ const {
|
|||
PromisePrototypeThen,
|
||||
SafePromiseAll,
|
||||
Symbol,
|
||||
SymbolFor,
|
||||
} = primordials;
|
||||
|
||||
import { FsFile } from "ext:deno_fs/30_fs.js";
|
||||
|
@ -76,15 +77,21 @@ class Process {
|
|||
this.pid = res.pid;
|
||||
|
||||
if (res.stdinRid && res.stdinRid > 0) {
|
||||
this.stdin = new FsFile(res.stdinRid);
|
||||
this.stdin = new FsFile(res.stdinRid, SymbolFor("Deno.internal.FsFile"));
|
||||
}
|
||||
|
||||
if (res.stdoutRid && res.stdoutRid > 0) {
|
||||
this.stdout = new FsFile(res.stdoutRid);
|
||||
this.stdout = new FsFile(
|
||||
res.stdoutRid,
|
||||
SymbolFor("Deno.internal.FsFile"),
|
||||
);
|
||||
}
|
||||
|
||||
if (res.stderrRid && res.stderrRid > 0) {
|
||||
this.stderr = new FsFile(res.stderrRid);
|
||||
this.stderr = new FsFile(
|
||||
res.stderrRid,
|
||||
SymbolFor("Deno.internal.FsFile"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue