Skip to content

Commit

Permalink
fix: 🐛 deployments problems (:/)
Browse files Browse the repository at this point in the history
  • Loading branch information
rabraghib committed Apr 10, 2024
1 parent 869bea3 commit ee13c99
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions website/app/api/run-code/route.ts
Original file line number Diff line number Diff line change
@@ -19,15 +19,15 @@ export async function POST(req: Request) {

async function setupDarijaScript() {
try {
const { stderr } = await execute('darijascript --version');
const { stderr } = await execute('./darijascript --version');
if (stderr) {
throw new Error(stderr);
}
} catch (error) {
const res = await fetch(
'https://github.com/rabraghib/darijascript/releases/latest/download/darijascript-bin'
);
const outFile = createWriteStream('/usr/local/bin/darijascript');
const outFile = createWriteStream('./darijascript');
res.body?.pipeTo(
new WritableStream({
write(chunk) {
@@ -38,8 +38,7 @@ async function setupDarijaScript() {
},
})
);
// await writeFile('/usr/local/bin/darijascript', bin);
await execute('chmod +x /usr/local/bin/darijascript');
await execute('chmod +x ./darijascript');
}
}

0 comments on commit ee13c99

Please sign in to comment.