more linting
This commit is contained in:
parent
db58168a2f
commit
ce6b458166
6 changed files with 14 additions and 11 deletions
|
@ -41,7 +41,7 @@ export function detectEncodingByBOMFromBuffer(buffer: NodeBuffer, bytesRead: num
|
|||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Detects the Byte Order Mark in a given file.
|
||||
|
|
|
@ -32,7 +32,7 @@ export function readdir(path: string, callback: (error: Error, files: string[])
|
|||
}
|
||||
|
||||
return readdirNormalize(path, callback);
|
||||
};
|
||||
}
|
||||
|
||||
function readdirNormalize(path: string, callback: (error: Error, files: string[]) => void): void {
|
||||
fs.readdir(path, (error, children) => {
|
||||
|
|
|
@ -37,7 +37,7 @@ export function parallel<T, E>(list: T[], fn: (item: T, callback: (err: Error, r
|
|||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the given function (fn) over the given array of items (param) in sequential order and returns the first occurred error or the result as
|
||||
|
@ -117,7 +117,7 @@ export function loop<E>(param: any, fn: (item: any, callback: (error: Error, res
|
|||
// Start looping with first element in array
|
||||
looper(0);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function Sequence(sequences: { (...param: any[]): void; }[]): void {
|
||||
|
||||
|
@ -186,4 +186,4 @@ export function sequence(errorHandler: (error: Error) => void, ...sequences: Fun
|
|||
export function sequence(sequences: Function[]): void;
|
||||
export function sequence(sequences: any): void {
|
||||
Sequence((Array.isArray(sequences)) ? sequences : Array.prototype.slice.call(arguments));
|
||||
};
|
||||
}
|
|
@ -204,7 +204,7 @@ export abstract class AbstractProcess<TProgressData> {
|
|||
result.cmdCode = <number>data;
|
||||
}
|
||||
cc(result);
|
||||
}
|
||||
};
|
||||
if (this.shell && Platform.isWindows) {
|
||||
let options: any = Objects.clone(this.options);
|
||||
options.windowsVerbatimArguments = true;
|
||||
|
@ -228,7 +228,7 @@ export abstract class AbstractProcess<TProgressData> {
|
|||
];
|
||||
if (quotedCommand) {
|
||||
if (quotedArg) {
|
||||
args.push('"' + commandLine.join(' ') + '"')
|
||||
args.push('"' + commandLine.join(' ') + '"');
|
||||
} else if (commandLine.length > 1) {
|
||||
args.push('"' + commandLine[0] + '"' + ' ' + commandLine.slice(1).join(' '));
|
||||
} else {
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
import { Url, parse as parseUrl } from 'url';
|
||||
import { isBoolean } from 'vs/base/common/types';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import HttpProxyAgent = require('http-proxy-agent');
|
||||
import HttpsProxyAgent = require('https-proxy-agent');
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import { Promise, TPromise } from 'vs/base/common/winjs.base';
|
|||
import { isBoolean } from 'vs/base/common/types';
|
||||
import https = require('https');
|
||||
import http = require('http');
|
||||
import { Url, parse as parseUrl } from 'url';
|
||||
import { parse as parseUrl } from 'url';
|
||||
import { createWriteStream } from 'fs';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
|
||||
|
@ -64,8 +64,12 @@ export function request(options: IRequestOptions): TPromise<IRequestResult> {
|
|||
});
|
||||
req.on('error', e);
|
||||
|
||||
if (options.timeout) req.setTimeout(options.timeout);
|
||||
if (options.data) req.write(options.data);
|
||||
if (options.timeout) {
|
||||
req.setTimeout(options.timeout);
|
||||
}
|
||||
if (options.data) {
|
||||
req.write(options.data);
|
||||
}
|
||||
|
||||
req.end();
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue