File tree Expand file tree Collapse file tree
fcli-core/fcli-tool/src/main/java/com/fortify/cli/tool/definitions/helper Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,7 +139,14 @@ private static List<ToolDefinitionsOutputDescriptor> getOutputDescriptors(String
139139
140140 private static final ToolDefinitionsStateDescriptor update (String source , Path dest ) throws IOException {
141141 try {
142- UnirestHelper .download ("tool" , new URL (source ).toString (), dest .toFile ());
142+ var url = new URL (source );
143+ Path tempFile = Files .createTempFile ("tool-definitions-" , ".zip" );
144+ try {
145+ UnirestHelper .download ("tool" , url .toString (), tempFile .toFile ());
146+ mergeDefinitionsZip (dest , tempFile .toString ());
147+ } finally {
148+ Files .deleteIfExists (tempFile );
149+ }
143150 } catch (MalformedURLException e ) {
144151 if (!isValidZip (source )) {
145152 throw new FcliSimpleException ("Invalid tool definitions file" , e );
You can’t perform that action at this time.
0 commit comments