From ecbb3c7420ebb63d9a870760df602b27cef82939 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 18 Jul 2020 17:44:30 +0200 Subject: Added debug mode --- run | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'run') diff --git a/run b/run index 7ba78f1..6480f46 100755 --- a/run +++ b/run @@ -1,4 +1,10 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash -deno test test/ && - deno run -q --allow-net --allow-env --allow-read --unstable src/main.ts +ARGS=(--allow-net --allow-env --allow-read --unstable) + +if grep -q "DEBUG=1" .env; then + deno test "${ARGS[@]}" test/ && + deno run "${ARGS[@]}" src/main.ts +else + deno run "${ARGS[@]}" src/main.ts +fi -- cgit v1.2.3