From 99c189b0a34de3e6742751c9053c229ed0fa8bc5 Mon Sep 17 00:00:00 2001 From: Yi Cheng Date: Wed, 12 Feb 2020 11:15:47 -0800 Subject: [PATCH] Use --spec-file post 1.25.0 (#493) --- .../pants/service/PantsCompileOptionsExecutor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/twitter/intellij/pants/service/PantsCompileOptionsExecutor.java b/src/com/twitter/intellij/pants/service/PantsCompileOptionsExecutor.java index 150c856cd..0222c911d 100644 --- a/src/com/twitter/intellij/pants/service/PantsCompileOptionsExecutor.java +++ b/src/com/twitter/intellij/pants/service/PantsCompileOptionsExecutor.java @@ -212,7 +212,12 @@ private GeneralCommandLine getPantsExportCommand(final File outputFile, @NotNull targetSpecsFileWriter.write('\n'); } } - commandLine.addParameter("--target-spec-file=" + targetSpecsFile.getPath()); + if (PantsUtil.isCompatiblePantsVersion(getProjectPath(), "1.25.0")) { + commandLine.addParameter("--spec-file=" + targetSpecsFile.getPath()); + } + else { + commandLine.addParameter("--target-spec-file=" + targetSpecsFile.getPath()); + } commandLine.addParameter("--no-quiet"); if (PantsUtil.isCompatiblePantsVersion(getProjectPath(), "1.24.0")) {