Skip to content

Commit 33bd343

Browse files
author
Brenton Bostick
committed
Fix 429380: Code Analysis Options... and Code Formatting palettes are missing from layout
1 parent 94c4886 commit 33bd343

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ endif()
135135

136136
file(MAKE_DIRECTORY
137137
${PROJECT_BINARY_DIR}/paclet/${PACLET}
138+
${PROJECT_BINARY_DIR}/paclet/${PACLET}/FrontEnd/Palettes/
138139
)
139140

140141

CodeFormatter/Generate/Palette.wl

+12-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,9 @@ Module[{nb, res},
219219
Print["CreatePalette failed: ", nb];
220220
Quit[1]
221221
];
222-
222+
223+
Quiet[DeleteFile[FileNameJoin[{buildDir, "paclet", "CodeFormatter", "FrontEnd", "Palettes", "CodeFormatter.nb"}]], DeleteFile::fdnfnd];
224+
223225
Print["saving CodeFormatter.nb"];
224226
res = NotebookSave[nb, FileNameJoin[{buildDir, "paclet", "CodeFormatter", "FrontEnd", "Palettes", "CodeFormatter.nb"}]];
225227

@@ -230,6 +232,15 @@ Module[{nb, res},
230232
];
231233
];
232234

235+
(*
236+
NotebookSave may fail, but give no indication,
237+
so need to explicitly check that file was created
238+
bug 429251
239+
*)
240+
If[!FileExistsQ[FileNameJoin[{buildDir, "paclet", "CodeFormatter", "FrontEnd", "Palettes", "CodeFormatter.nb"}]],
241+
Quit[1]
242+
];
243+
233244
Print["Done UsingFrontEnd"];
234245
]
235246

0 commit comments

Comments
 (0)