@@ -6647,13 +6647,15 @@ function runLint(lintPath, patchPath) {
66476647 throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a future`);
66486648 }
66496649 addedArgs.push(`--out-format=github-actions`);
6650- if (patchPath && (userArgNames.has(`new`) || userArgNames.has(`new-from-rev`) || userArgNames.has(`new-from-patch`))) {
6651- throw new Error(`please, don't specify manually --new* args when requesting only new issues`);
6650+ if (patchPath) {
6651+ if (userArgNames.has(`new`) || userArgNames.has(`new-from-rev`) || userArgNames.has(`new-from-patch`)) {
6652+ throw new Error(`please, don't specify manually --new* args when requesting only new issues`);
6653+ }
6654+ addedArgs.push(`--new-from-patch=${patchPath}`);
6655+ // Override config values.
6656+ addedArgs.push(`--new=false`);
6657+ addedArgs.push(`--new-from-rev=`);
66526658 }
6653- addedArgs.push(`--new-from-patch=${patchPath}`);
6654- // Override config values.
6655- addedArgs.push(`--new=false`);
6656- addedArgs.push(`--new-from-rev=`);
66576659 const workingDirectory = core.getInput(`working-directory`);
66586660 const cmdArgs = {};
66596661 if (workingDirectory) {
@@ -6667,7 +6669,7 @@ function runLint(lintPath, patchPath) {
66676669 cmdArgs.cwd = path.resolve(workingDirectory);
66686670 }
66696671 const cmd = `${lintPath} run ${addedArgs.join(` `)} ${userArgs}`.trimRight();
6670- core.info(`Running [${cmd}] in [${cmdArgs.cwd}] ...`);
6672+ core.info(`Running [${cmd}] in [${cmdArgs.cwd || `` }] ...`);
66716673 const startedAt = Date.now();
66726674 try {
66736675 const res = yield execShellCommand(cmd, cmdArgs);
0 commit comments