Skip to content

Commit

Permalink
fix some coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
barryib committed Sep 2, 2016
1 parent 8627e95 commit 9381413
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cli_plugin/install/downloaders/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function downloadResponse({ resp, targetPath, progress }) {
Responsible for managing http transfers
*/
export default async function downloadUrl(logger, sourceUrl, targetPath, timeout, proxy) {
let reqOptions = {
const reqOptions = {
'timeout': timeout,
'maxRedirects': 11, //Because this one goes to 11.
'encoding': null
Expand Down
4 changes: 2 additions & 2 deletions src/cli_plugin/install/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export function parseMilliseconds(val) {
};

export function parseProxy(val) {
let result = val.trim();
let regexp = /(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
const result = val.trim();
const regexp = /(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
if (!regexp.test(result)) {
throw new Error(`Invalid proxy name ${result}`);
}
Expand Down

0 comments on commit 9381413

Please sign in to comment.