This commit is contained in:
Vishrut Shah 2017-04-18 15:35:57 -07:00
Родитель dfa57da318
Коммит 13afb1bafb
2 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -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;