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")) {