Skip to content

Commit

Permalink
Merge pull request #574 from HaveAGitGat/stream_error
Browse files Browse the repository at this point in the history
Add error if all streams removed
  • Loading branch information
HaveAGitGat authored Dec 22, 2023
2 parents 151cc32 + bf3c589 commit 9653007
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down

0 comments on commit 9653007

Please sign in to comment.