Bug fixes
This commit is contained in:
Родитель
dfa57da318
Коммит
13afb1bafb
|
@ -407,8 +407,12 @@ exports.gitClone = function gitClone(url, directory) {
|
|||
throw new Error('directory is a required parameter of type string and it cannot be an empty string.');
|
||||
}
|
||||
|
||||
if (fs.existsSync(directory) && fs.lstatSync(directory).isDirectory()) {
|
||||
throw new Error(`directory "${directory}" already exists. Please delete it first and then try again.`);
|
||||
// If the directory exists then we assume that the repo to be cloned is already present.
|
||||
if (fs.existsSync(directory)) {
|
||||
if (!fs.lstatSync(directory).isDirectory()) {
|
||||
throw new Error(`"${directory}" must be a directory.`);
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
fs.mkdirSync(directory);
|
||||
}
|
||||
|
|
|
@ -378,7 +378,7 @@ class LiveValidator {
|
|||
let request = requestResponseObj.liveRequest;
|
||||
let response = requestResponseObj.liveResponse;
|
||||
if (!request.query) {
|
||||
request.query = url.parse(request.url, true);
|
||||
request.query = url.parse(request.url, true).query;
|
||||
}
|
||||
let currentApiVersion = request.query['api-version'] || Constants.unknownApiVersion;
|
||||
let potentialOperationsResult;
|
||||
|
|
Загрузка…
Ссылка в новой задаче