Fix bash on NixOS

Not all systems have their bash under bin.
This commit is contained in:
Sandro Jäckel 2020-09-26 13:20:49 +02:00
parent 12a757a954
commit 547c6fc17b
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -17,7 +17,7 @@ function searchYoutube(q, limit, response) {
q = escape(`ytsearch${limit}:${q}`);
const command = `set -o pipefail; ${cmd} -j ${q} | jq "{id,title}" | jq -s .`;
require("child_process").exec(command, {shell:"/bin/bash"}, (error, stdout, stderr) => {
require("child_process").exec(command, {shell:"bash"}, (error, stdout, stderr) => {
if (error) {
console.log("error", error);
response.writeHead(500);