Merge branch 'sirjonasxx:extensionstore' into extensionstore

This commit is contained in:
WiredSpast 2021-08-20 20:08:43 +02:00 committed by GitHub
commit d2ba27136a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View File

@ -98,10 +98,10 @@ public class StoreExtensionDetailsItem implements ContentItem {
if (storeExtension.getFramework().getFramework().isInstallationRequired()) { if (storeExtension.getFramework().getFramework().isInstallationRequired()) {
contentBuilder.append("Warning: the framework requires --url:additional installations-") contentBuilder.append("Warning: the framework requires --url:additional installations-")
.append(storeExtension.getFramework().getFramework().getInstallationInstructions()).append(" !\n"); .append(storeExtension.getFramework().getFramework().getInstallationInstructions()).append(" !\n\n");
} }
if (!storeExtension.isStable()) { if (!storeExtension.isStable()) {
contentBuilder.append("Warning: this extension has been marked unstable!\n"); contentBuilder.append("Warning: this extension has been marked unstable!\n\n");
} }
contentBuilder.append("<div>" contentBuilder.append("<div>"

View File

@ -94,8 +94,7 @@ public class StoreExtensionTools {
} }
zipInputStream.closeEntry(); zipInputStream.closeEntry();
zipInputStream.close(); zipInputStream.close();
inputStream.close();
} }
@ -126,10 +125,17 @@ public class StoreExtensionTools {
List<String> command = OSValidator.isMac() ? ext.getCommands().getMac() : (OSValidator.isUnix() ? ext.getCommands().getLinux() : List<String> command = OSValidator.isMac() ? ext.getCommands().getMac() : (OSValidator.isUnix() ? ext.getCommands().getLinux() :
(OSValidator.isWindows() ? ext.getCommands().getWindows() : ext.getCommands().getDefault())); (OSValidator.isWindows() ? ext.getCommands().getWindows() : ext.getCommands().getDefault()));
command = command == null ? ext.getCommands().getDefault() : command; command = command == null ? ext.getCommands().getDefault() : command;
// String commandRaw = new JSONArray(command).toString();
// PrintWriter out = new PrintWriter(Paths.get(path, "command.txt").toString());
// out.println(commandRaw);
// out.close();
FileUtils.writeStringToFile(commandFile, new JSONArray(command).toString(), "UTF-8"); FileUtils.writeStringToFile(commandFile, new JSONArray(command).toString(), "UTF-8");
listener.success(path); listener.success(path);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace();
listener.fail("Error while unzipping"); listener.fail("Error while unzipping");
removeExtension(path); removeExtension(path);
} }