🐛 Fix patch verification
This commit is contained in:
parent
b984512a75
commit
93c47e2fbc
1 changed files with 3 additions and 3 deletions
|
@ -29,8 +29,8 @@ export default function verifyPatch(fileEntries: ISsnFileEntry[], product: Produ
|
||||||
if (secondToLastFile.name !== validLastFileName) {
|
if (secondToLastFile.name !== validLastFileName) {
|
||||||
throw new Error(`Last or second to last file must be called "${validLastFileName}" but it was "${secondToLastFile.name}".`);
|
throw new Error(`Last or second to last file must be called "${validLastFileName}" but it was "${secondToLastFile.name}".`);
|
||||||
}
|
}
|
||||||
if (secondToLastFile.diffType !== SsnDiffType.NewFile) {
|
if (secondToLastFile.diffType !== SsnDiffType.Changed) {
|
||||||
throw new Error(`Second to last file (.version file) must have diffType 0 but it had diffType ${secondToLastFile.diffType}.`);
|
throw new Error(`Second to last file (.version file) must have diffType 2 but it had diffType ${secondToLastFile.diffType}.`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`Last file must be called "${validLastFileName}" or "${validLastFileAlternate}" but it was "${lastFile.name}".`);
|
throw new Error(`Last file must be called "${validLastFileName}" or "${validLastFileAlternate}" but it was "${lastFile.name}".`);
|
||||||
|
|
Loading…
Reference in a new issue