🚧 Add debugging message
This commit is contained in:
parent
2cd936e6c2
commit
59ffb39d8a
3 changed files with 6 additions and 3 deletions
|
@ -16,6 +16,7 @@ export default function downloadUrlContents({ host, path, size }: {host: string,
|
|||
const folderName = nodePath.dirname(tempFileName);
|
||||
createDirRecursively(folderName).then(() => {
|
||||
//Check if file already exists locally
|
||||
console.log('Checking local cache...', tempFileName, size);
|
||||
checkLocalCache(tempFileName, size).then((cacheStatus) => {
|
||||
if (cacheStatus) {
|
||||
return resolve(tempFileName);
|
||||
|
|
|
@ -135,7 +135,7 @@ export default async function getPatch({ product, from, to, sourceDirectory, tar
|
|||
});
|
||||
|
||||
//Need to delete deleted files
|
||||
if (sourceDirectory === targetDirectory) {
|
||||
if (sourceDir === targetDir) {
|
||||
fileEntries.filter((file) => file.diffType === SsnDiffType.Deleted).forEach((file) => {
|
||||
//delete file
|
||||
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)
|
||||
if (sourceDirectory !== targetDirectory) {
|
||||
if (sourceDir !== targetDir) {
|
||||
fileEntries.filter((file) => file.diffType === SsnDiffType.Unchanged).forEach(async (file) => {
|
||||
//copy file
|
||||
const sourceName = path.join(sourceDir, file.name);
|
||||
|
|
|
@ -31,6 +31,8 @@ export default function launchProcess(
|
|||
spawnedProcess.stdout.on('end', resolve);
|
||||
|
||||
spawnedProcess.stderr.setEncoding('utf8');
|
||||
spawnedProcess.stderr.on('data', reject);
|
||||
spawnedProcess.stderr.on('data', (error) => {
|
||||
reject(`Error in process:\n> ${processPath} ${parameters.join('v')}\nerror`);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue