mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
don't check for trailing slash, var stream
This commit is contained in:
@@ -1079,8 +1079,7 @@ pub const RunCommand = struct {
|
||||
|
||||
return true;
|
||||
} else if ((script_name_to_search.len > 1 and script_name_to_search[0] == '/') or
|
||||
(script_name_to_search.len > 2 and script_name_to_search[0] == '.' and script_name_to_search[1] == '/' and
|
||||
script_name_to_search[script_name_to_search.len - 1] != '/'))
|
||||
(script_name_to_search.len > 2 and script_name_to_search[0] == '.' and script_name_to_search[1] == '/'))
|
||||
{
|
||||
Run.boot(ctx, ctx.allocator.dupe(u8, script_name_to_search) catch unreachable) catch |err| {
|
||||
if (Output.enable_ansi_colors) {
|
||||
|
||||
@@ -128,9 +128,9 @@ export function getStdioWriteStream(fd_, getWindowSize) {
|
||||
_write(chunk, encoding, callback) {
|
||||
if (!this.#writeStream) {
|
||||
var { createWriteStream } = require("node:fs");
|
||||
this.#writeStream = createWriteStream(this.#fdPath);
|
||||
var stream = (this.#writeStream = createWriteStream(this.#fdPath));
|
||||
|
||||
this.#writeStream.on("finish", () => {
|
||||
stream.on("finish", () => {
|
||||
if (this.#onFinish) {
|
||||
const cb = this.#onFinish;
|
||||
this.#onFinish = null;
|
||||
@@ -138,7 +138,7 @@ export function getStdioWriteStream(fd_, getWindowSize) {
|
||||
}
|
||||
});
|
||||
|
||||
this.#writeStream.on("drain", () => {
|
||||
stream.on("drain", () => {
|
||||
if (this.#onDrain) {
|
||||
const cb = this.#onDrain;
|
||||
this.#onDrain = null;
|
||||
@@ -146,14 +146,15 @@ export function getStdioWriteStream(fd_, getWindowSize) {
|
||||
}
|
||||
});
|
||||
|
||||
eos(this.#writeStream, err => {
|
||||
eos(stream, err => {
|
||||
this.#writable = false;
|
||||
if (err) {
|
||||
destroy(this.#writeStream, err);
|
||||
destroy(stream, err);
|
||||
}
|
||||
this.#onFinished(err);
|
||||
});
|
||||
}
|
||||
|
||||
if (this.#writeStream.write(chunk, encoding)) {
|
||||
callback();
|
||||
} else {
|
||||
|
||||
4
src/js/out/WebCoreJSBuiltins.cpp
generated
4
src/js/out/WebCoreJSBuiltins.cpp
generated
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user