diff --git a/src/ssn/getPatch.ts b/src/ssn/getPatch.ts index e7efe69..7f29c5f 100644 --- a/src/ssn/getPatch.ts +++ b/src/ssn/getPatch.ts @@ -91,7 +91,7 @@ export default async function getPatch({ product, from, to, sourceDirectory, tar fs.rename(outputNameTemp, outputName, (renameError) => { if (renameError) { - throw new Error(`Could not rename output file "${outputNameTemp}": ${renameError.name}`); + throw new Error(`Could not rename output file "${outputNameTemp}": ${renameError.message}`); } }); } catch (error) { @@ -115,18 +115,18 @@ export default async function getPatch({ product, from, to, sourceDirectory, tar if (sourceDir === targetDir) { fs.unlink(sourceFile, (deleteError) => { if (deleteError) { - throw new Error(`Could not delete old source file "${sourceFile}": ${deleteError.name}`); + throw new Error(`Could not delete old source file "${sourceFile}": ${deleteError.message}`); } fs.rename(outputNameTemp, outputName, (renameError) => { if (renameError) { - throw new Error(`Could not rename output file "${outputNameTemp}": ${renameError.name}`); + throw new Error(`Could not rename output file "${outputNameTemp}": ${renameError.message}`); } }); }); } else { fs.rename(outputNameTemp, outputName, (renameError) => { if (renameError) { - throw new Error(`Could not rename output file "${outputNameTemp}": ${renameError.name}`); + throw new Error(`Could not rename output file "${outputNameTemp}": ${renameError.message}`); } }); }