fix: jsr install breaks because of missing asciiart file
This commit is contained in:
@@ -3,8 +3,10 @@ import { join } from "@std/path";
|
||||
|
||||
export async function getAsciiArt(art: string) {
|
||||
try {
|
||||
const artFilePath = Deno.env.get("BEARMETAL_ASCII_PATH") ||
|
||||
join(import.meta.dirname || "", "../asciiart.txt");
|
||||
const artFilePath =
|
||||
Deno.env.get("BEARMETAL_ASCII_PATH") || import.meta.dirname
|
||||
? join(import.meta.dirname || "", "../asciiart.txt")
|
||||
: "https://git.cyborggrizzly.com/BearMetal/pdf-tools/raw/branch/main/asciiart.txt";
|
||||
let artFileText: string;
|
||||
if (artFilePath?.startsWith("http")) {
|
||||
artFileText = await fetch(artFilePath).then((res) => res.text());
|
||||
|
Reference in New Issue
Block a user