fix: better error message for bun install fs permission errors (#7550)

* remove `prettyWarn`, add easy print utils, clarify a package.json loading error

* error when node_modules isnt writable

* hmm

* fix instal

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
This commit is contained in:
dave caruso
2023-12-12 00:18:05 -08:00
committed by GitHub
parent d163351f3e
commit a2f595d352
8 changed files with 270 additions and 131 deletions

View File

@@ -3020,7 +3020,7 @@ pub const VirtualMachine = struct {
pub fn initIPCInstance(this: *VirtualMachine, fd: i32) void {
if (Environment.isWindows) {
Output.prettyWarnln("IPC is not supported on Windows", .{});
Output.warn("IPC is not supported on Windows", .{});
return;
}
this.event_loop.ensureWaker();
@@ -3029,7 +3029,7 @@ pub const VirtualMachine = struct {
const socket = uws.newSocketFromFd(context, @sizeOf(*IPCInstance), fd) orelse {
uws.us_socket_context_free(0, context);
Output.prettyWarnln("Failed to initialize IPC connection to parent", .{});
Output.warn("Failed to initialize IPC connection to parent", .{});
return;
};