🚧 Add debugging message

This commit is contained in:
C-3PO 2018-09-14 04:44:44 +02:00
parent 2cd936e6c2
commit 59ffb39d8a
Signed by: c3po
GPG key ID: 62993C4BB4D86F24
3 changed files with 6 additions and 3 deletions

View file

@ -16,6 +16,7 @@ export default function downloadUrlContents({ host, path, size }: {host: string,
const folderName = nodePath.dirname(tempFileName); const folderName = nodePath.dirname(tempFileName);
createDirRecursively(folderName).then(() => { createDirRecursively(folderName).then(() => {
//Check if file already exists locally //Check if file already exists locally
console.log('Checking local cache...', tempFileName, size);
checkLocalCache(tempFileName, size).then((cacheStatus) => { checkLocalCache(tempFileName, size).then((cacheStatus) => {
if (cacheStatus) { if (cacheStatus) {
return resolve(tempFileName); return resolve(tempFileName);

View file

@ -135,7 +135,7 @@ export default async function getPatch({ product, from, to, sourceDirectory, tar
}); });
//Need to delete deleted files //Need to delete deleted files
if (sourceDirectory === targetDirectory) { if (sourceDir === targetDir) {
fileEntries.filter((file) => file.diffType === SsnDiffType.Deleted).forEach((file) => { fileEntries.filter((file) => file.diffType === SsnDiffType.Deleted).forEach((file) => {
//delete file //delete file
const fileName = path.join(targetDir, file.name); const fileName = path.join(targetDir, file.name);
@ -149,7 +149,7 @@ export default async function getPatch({ product, from, to, sourceDirectory, tar
} }
//Need to copy unchanged files (if we are patching into a different directory) //Need to copy unchanged files (if we are patching into a different directory)
if (sourceDirectory !== targetDirectory) { if (sourceDir !== targetDir) {
fileEntries.filter((file) => file.diffType === SsnDiffType.Unchanged).forEach(async (file) => { fileEntries.filter((file) => file.diffType === SsnDiffType.Unchanged).forEach(async (file) => {
//copy file //copy file
const sourceName = path.join(sourceDir, file.name); const sourceName = path.join(sourceDir, file.name);

View file

@ -31,6 +31,8 @@ export default function launchProcess(
spawnedProcess.stdout.on('end', resolve); spawnedProcess.stdout.on('end', resolve);
spawnedProcess.stderr.setEncoding('utf8'); spawnedProcess.stderr.setEncoding('utf8');
spawnedProcess.stderr.on('data', reject); spawnedProcess.stderr.on('data', (error) => {
reject(`Error in process:\n> ${processPath} ${parameters.join('v')}\nerror`);
});
}); });
} }