From dd3a5019a13ae820b702ae81f7bcf8542b2f4cae Mon Sep 17 00:00:00 2001 From: dylan <> Date: Tue, 26 Mar 2024 20:31:55 -0700 Subject: [PATCH] try pico8 in bin --- Dockerfile | 6 +++--- src/server/api/release.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index e1bb05b..e05198d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,9 +15,9 @@ WORKDIR /app # intentionally here only for temporary cache-busting test # COPY ./client ./client -COPY ./pico8 ./pico8 -RUN echo "chmoding pico8" -RUN chmod +x ./pico8/pico8 +COPY ./pico8/pico8 /usr/bin/ +# RUN echo "chmoding pico8" +# RUN chmod +x ./usr/bin/pico8 # Copies stuff to cache for install COPY ./package.json ./package-lock.json tsconfig.json ./ diff --git a/src/server/api/release.ts b/src/server/api/release.ts index 475f5bb..f341c10 100644 --- a/src/server/api/release.ts +++ b/src/server/api/release.ts @@ -58,7 +58,7 @@ const handler = async ({payload}: FirRouteInput) => { console.log("main exists: ", fs.existsSync(path.join(repoPath, manifest.main))); const {stdout} = await execa("ls", ["-la", picoDirPath], {shell: true}); console.log(stdout); - await execa(picoBinPath, [path.join(repoPath, manifest.main), "-export", path.join(repoPath, "result.js")], {env: {PATH: "/app/pico8"}}); + await execa("pico8", [path.join(repoPath, manifest.main), "-export", path.join(repoPath, "result.js")]); // await execa(picoBinPath, [path.join(repoPath, manifest.main), "-export", path.join(repoPath, "result.png")]); const js = await fs.promises.readFile(path.join(repoPath, "result.js"), "utf8"); // const png = Buffer.from(await fs.promises.readFile(path.join(repoPath, "result.png"))).toString("base64");