mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-10 08:15:00 -04:00
remove unused startFrom argument from Recipe
This commit is contained in:
parent
d78730edc0
commit
536a82684c
4 changed files with 7 additions and 9 deletions
|
@ -53,7 +53,7 @@ class Chef {
|
|||
this.dish.set(input, type);
|
||||
|
||||
try {
|
||||
progress = await recipe.execute(this.dish, progress);
|
||||
progress = await recipe.execute(this.dish);
|
||||
} catch (err) {
|
||||
log.error(err);
|
||||
error = {
|
||||
|
|
|
@ -169,25 +169,23 @@ class Recipe {
|
|||
* Executes each operation in the recipe over the given Dish.
|
||||
*
|
||||
* @param {Dish} dish
|
||||
* @param {number} [startFrom=0]
|
||||
* - The index of the Operation to start executing from
|
||||
* @param {number} [forkState={}]
|
||||
* - If this is a forked recipe, the state of the recipe up to this point
|
||||
* @returns {number}
|
||||
* - The final progress through the recipe
|
||||
*/
|
||||
async execute(dish, startFrom=0, forkState={}) {
|
||||
async execute(dish, forkState={}) {
|
||||
let op, input, output,
|
||||
numJumps = 0,
|
||||
numRegisters = forkState.numRegisters || 0;
|
||||
|
||||
if (startFrom === 0) this.lastRunOp = null;
|
||||
this.lastRunOp = null;
|
||||
|
||||
await this._hydrateOpList();
|
||||
|
||||
log.debug(`[*] Executing recipe of ${this.opList.length} operations, starting at ${startFrom}`);
|
||||
log.debug(`[*] Executing recipe of ${this.opList.length} operations`);
|
||||
|
||||
for (let i = startFrom; i < this.opList.length; i++) {
|
||||
for (let i = 0; i < this.opList.length; i++) {
|
||||
op = this.opList[i];
|
||||
log.debug(`[${i}] ${op.name} ${JSON.stringify(op.ingValues)}`);
|
||||
if (op.disabled) {
|
||||
|
|
|
@ -97,7 +97,7 @@ class Fork extends Operation {
|
|||
dish.set(inputs[i], inputType);
|
||||
|
||||
try {
|
||||
progress = await recipe.execute(dish, 0, state);
|
||||
progress = await recipe.execute(dish, state);
|
||||
} catch (err) {
|
||||
if (!ignoreErrors) {
|
||||
throw err;
|
||||
|
|
|
@ -123,7 +123,7 @@ class Subsection extends Operation {
|
|||
dish.set(matchStr, inputType);
|
||||
|
||||
try {
|
||||
progress = await recipe.execute(dish, 0, state);
|
||||
progress = await recipe.execute(dish, state);
|
||||
} catch (err) {
|
||||
if (!ignoreErrors) {
|
||||
throw err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue