From f8e0bce1336275c599afd7c2ee08df11d28fd317 Mon Sep 17 00:00:00 2001 From: Kerwin Bryant Date: Fri, 28 Jul 2023 01:41:00 +0800 Subject: [PATCH] Update start.js (#175) Compatible with repository addresses using http protocol. --- start.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/start.js b/start.js index dc54931..de759d7 100644 --- a/start.js +++ b/start.js @@ -1,9 +1,10 @@ 'use strict'; const spawn = require('child_process').spawn; const path = require("path"); +const http = require('http'); const https = require('https'); -const get = (url, options = {}) => new Promise((resolve, reject) => https +const get = (url, options = {}) => new Promise((resolve, reject) => ((url.protocol == "https:") ? https : http) .get(url, options, (res) => { const chunks = []; res.on('data', (chunk) => chunks.push(chunk));