From 8c3ca586a90153f658bdb6152148617224ea7ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iiro=20J=C3=A4ppinen?= Date: Fri, 4 Oct 2019 17:55:04 +0300 Subject: [PATCH] fix: create fn title with mock file list of correct length --- src/makeCmdTasks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/makeCmdTasks.js b/src/makeCmdTasks.js index 82dcc8300..8c3ce2ac5 100644 --- a/src/makeCmdTasks.js +++ b/src/makeCmdTasks.js @@ -28,7 +28,7 @@ module.exports = async function makeCmdTasks({ commands, files, gitDir, shell }) // Create a matching command array with [file] in place of file names let mockCommands if (isFn) { - const mockFileList = Array(commands.length).fill('[file]') + const mockFileList = Array(files.length).fill('[file]') const resolved = command(mockFileList) mockCommands = Array.isArray(resolved) ? resolved : [resolved] }