From ecc7e7cf713c3fcd17cc99cfe9e39eb4283a620b Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 10 May 2021 13:19:09 +0100 Subject: [PATCH] Formatting. --- hosting/scripts/setup.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/hosting/scripts/setup.js b/hosting/scripts/setup.js index 31fc9bec10..c62ac14f29 100755 --- a/hosting/scripts/setup.js +++ b/hosting/scripts/setup.js @@ -15,22 +15,20 @@ function execute(command) { }) } -async function commandExistsUnix (command) { +async function commandExistsUnix(command) { const unixCmd = `command -v ${command} 2>/dev/null && { echo >&1 ${command}; exit 0; }` return execute(command) } -async function commandExistsWindows (command) { +async function commandExistsWindows(command) { if (/[\x00-\x1f<>:"|?*]/.test(command)) { return false } return execute(`where ${command}`) } -function commandExists (command) { - return windows - ? commandExistsWindows(command) - : commandExistsUnix(command) +function commandExists(command) { + return windows ? commandExistsWindows(command) : commandExistsUnix(command) } async function init() { @@ -41,18 +39,23 @@ async function init() { return } if (mac) { - console.log("Please install docker by visiting: https://docs.docker.com/docker-for-mac/install/") + console.log( + "Please install docker by visiting: https://docs.docker.com/docker-for-mac/install/" + ) } else if (windows) { - console.log("Please install docker by visiting: https://docs.docker.com/docker-for-windows/install/") + console.log( + "Please install docker by visiting: https://docs.docker.com/docker-for-windows/install/" + ) } else if (linux) { console.log("Beginning automated linux installation.") await execute(`./hosting/scripts/linux/get-docker.sh`) await execute(`./hosting/scripts/linux/get-docker-compose.sh`) } else { - console.error("Platform unknown - please look online for information about installing docker for our OS.") + console.error( + "Platform unknown - please look online for information about installing docker for our OS." + ) } console.log("Once installation complete please re-run the setup script.") process.exit(-1) } init() -