Skip to content

Commit 2477085

Browse files
committed
run-phpstan: fix analyse command when no path is given
1 parent 06d2e2e commit 2477085

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/main.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ export async function run(): Promise<void> {
2929
await checkExecutable(phpBin);
3030

3131
const paths = core.getInput("analyse");
32-
const analyse = paths !== "undefined";
33-
3432
const level = core.getInput("level");
3533
const config = core.getInput("config");
3634
const autoloadFile = core.getInput("autoload-file");
@@ -42,8 +40,8 @@ export async function run(): Promise<void> {
4240
const ansi = core.getInput("ansi");
4341
const quiet = core.getInput("quiet");
4442

45-
const result = await exec.exec(`${phpBin} ${executable} ` +
46-
(analyse ? "analyse " + paths : "") +
43+
const result = await exec.exec(`${phpBin} ${executable} analyse ` +
44+
(paths !== "undefined" ? paths : "") +
4745
(level === "" ? "" : " --level=" + level) +
4846
(config === "" ? "" : " -c " + config) +
4947
(autoloadFile === "" ? "" : " --autoload-file=" + autoloadFile) +

0 commit comments

Comments
 (0)