From 6d9d4465ec8cd3a4e27a214e5894e3f9ed80fc07 Mon Sep 17 00:00:00 2001
From: Paul Mohr
Date: Mon, 18 Jul 2022 09:31:53 +0200
Subject: [PATCH 1/2] Update README.md
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 8b5c6e0..957b485 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@
## Project setup
-Download the [latest version](https://github.com/Sopamo/via/releases) of via and move it to `/usr/local/bin/v`.
+Download the [latest version](https://github.com/Sopamo/via/releases) of via and move it to `/usr/local/bin/v`. Make sure it's executable by running `sudo chmod +x /usr/local/bin/v`.
Create your first project configuration file by running `v init my-project` and follow the instructions.
@@ -65,4 +65,4 @@ deno run --allow-read --allow-run --allow-env --allow-write ./src/via.ts [projec
To build the binary, run:
```bash
deno compile --allow-read --allow-run --allow-env --allow-write ./src/via.ts
-```
\ No newline at end of file
+```
From 91db99018c0d05e0d63018f9da983aa8cf946d2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fiete=20B=C3=B6rner?=
Date: Mon, 18 Jul 2022 13:12:54 +0200
Subject: [PATCH 2/2] execute all commands into a sub shell
* this allows a more complex actions by using shell features like && || &
* it does not split up the action-string by spaces which could lead to non functional commands (if quotes are involved)
---
src/via.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/via.ts b/src/via.ts
index e10758f..dc07b44 100644
--- a/src/via.ts
+++ b/src/via.ts
@@ -89,7 +89,7 @@ const projectWideActions = ["start", "stop"]
async function runCommand(cmd: string, cwd: string) {
console.log(`Running ${cmd} in ${cwd}`)
const p = Deno.run({
- cmd: cmd.split(" "),
+ cmd: ['sh', '-c', cmd],
cwd,
});
await p.status()