aboutsummaryrefslogtreecommitdiff
path: root/run
diff options
context:
space:
mode:
authorMarvin Borner2020-07-18 17:44:30 +0200
committerMarvin Borner2020-07-18 17:44:30 +0200
commitecbb3c7420ebb63d9a870760df602b27cef82939 (patch)
treeeccc328286f2ad0935757c3556e3b7d79815b70f /run
parent34a3f2f132791ad33e6a6b59371bb6f029436ab4 (diff)
Added debug mode
Diffstat (limited to 'run')
-rwxr-xr-xrun12
1 files changed, 9 insertions, 3 deletions
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