@@ -6647,13 +6647,15 @@ function runLint(lintPath, patchPath) {
6647
6647
throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a future`);
6648
6648
}
6649
6649
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=`);
6652
6658
}
6653
- addedArgs.push(`--new-from-patch=${patchPath}`);
6654
- // Override config values.
6655
- addedArgs.push(`--new=false`);
6656
- addedArgs.push(`--new-from-rev=`);
6657
6659
const workingDirectory = core.getInput(`working-directory`);
6658
6660
const cmdArgs = {};
6659
6661
if (workingDirectory) {
@@ -6667,7 +6669,7 @@ function runLint(lintPath, patchPath) {
6667
6669
cmdArgs.cwd = path.resolve(workingDirectory);
6668
6670
}
6669
6671
const cmd = `${lintPath} run ${addedArgs.join(` `)} ${userArgs}`.trimRight();
6670
- core.info(`Running [${cmd}] in [${cmdArgs.cwd}] ...`);
6672
+ core.info(`Running [${cmd}] in [${cmdArgs.cwd || `` }] ...`);
6671
6673
const startedAt = Date.now();
6672
6674
try {
6673
6675
const res = yield execShellCommand(cmd, cmdArgs);
0 commit comments