Merge pull request #574 from HaveAGitGat/stream_error

Add error if all streams removed
This commit is contained in:
HaveAGitGat 2023-12-22 16:07:55 +00:00 committed by GitHub
commit 9653007fb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -118,6 +118,10 @@ var plugin = function (args) { return __awaiter(void 0, void 0, void 0, function
}
return !stream.removed;
});
if (streams.length === 0) {
args.jobLog('No streams mapped for new file');
throw new Error('No streams mapped for new file');
}
_loop_1 = function (i) {
var stream = streams[i];
stream.outputArgs = stream.outputArgs.map(function (arg) {

View file

@ -91,6 +91,11 @@ const plugin = async (args: IpluginInputArgs): Promise<IpluginOutputArgs> => {
return !stream.removed;
});
if (streams.length === 0) {
args.jobLog('No streams mapped for new file');
throw new Error('No streams mapped for new file');
}
for (let i = 0; i < streams.length; i += 1) {
const stream = streams[i];