Add update message

This commit is contained in:
Jarred Sumner
2022-04-05 03:51:24 -07:00
parent 7f4b1a5797
commit 2c0e8e0a99

View File

@@ -1,3 +1,16 @@
import { Buffer } from "buffer";
globalThis.Buffer ||= Buffer;
if (!("URL" in globalThis)) {
class Outdated extends Error {
constructor(message) {
super(message);
this.name = "Outdated";
}
}
throw new Outdated(
"Missing \"URL\", please run 'bun upgrade' to update to the latest version of Bun (added in v0.0.74)"
);
}