Skip to content

Commit

Permalink
Update start.js (#175)
Browse files Browse the repository at this point in the history
Compatible with repository addresses using http protocol.
  • Loading branch information
kerwin612 authored Jul 27, 2023
1 parent d9117be commit f8e0bce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion start.js
Original file line number Diff line number Diff line change
@@ -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));
Expand Down

0 comments on commit f8e0bce

Please sign in to comment.