{"record":{"id":"1edff4b9fd5c3a2e","repo":"quarkusio/quarkus","slug":"error-while-generating-the-project-update-script","errorCode":null,"errorMessage":"Error while generating the project update script","messagePattern":"Error while generating the project update script","errorType":"exception","errorClass":"QuarkusCommandException","httpStatus":null,"severity":"error","filePath":"independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/UpdateProjectCommandHandler.java","lineNumber":187,"sourceCode":"                            quarkusProject.getProjectDirPath(),\n                            rewritePluginVersion,\n                            fetchResult.getRecipesGAV(),\n                            recipe,\n                            logFile,\n                            rewriteDryRun);\n                    final Path patchFile = rewriteDir.resolve(\"rewrite.patch\");\n                    if (rewriteDryRun && Files.isRegularFile(patchFile)) {\n                        quarkusProject.log().info(\"Patch file available:\");\n                        quarkusProject.log().info(MessageFormatter.underline(projectDir.relativize(patchFile).toString()));\n                        quarkusProject.log().info(\"\");\n                    }\n\n                } else {\n                    printSeparator(quarkusProject.log());\n                }\n\n            } catch (IOException e) {\n                throw new QuarkusCommandException(\"Error while generating the project update script\", e);\n            }\n        }\n\n        return QuarkusCommandOutcome.success();\n    }\n\n    private static String askUserConfirmationForUpdate(MessageWriter log) {\n        System.out.print(System.lineSeparator() +\n                MessageFormatter.bold(\n                        \"Do you want to apply the generated update recipes with OpenRewrite?\")\n                + \" ([\" + MessageFormatter.green(\"y\") + \"]es, [\" + MessageFormatter.red(\"n\") + \"]o, [\"\n                + MessageFormatter.blue(\"d\") + \"]ry-run + [Enter])\"\n                + System.lineSeparator() + System.lineSeparator());\n        try (Scanner scanner = new Scanner(new FilterInputStream(System.in) {\n            @Override\n            public void close() throws IOException {\n                //don't close System.in!\n            }","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/UpdateProjectCommandHandler.java#L169-L205","documentation":"UpdateProjectCommandHandler.execute generates the recommended-update report/script for a project (recommended versions, recipe application). When writing that output — logging script content, writing the update script file — throws an IOException, it is wrapped in a QuarkusCommandException with 'Error while generating the project update script'.","triggerScenarios":"Running quarkus:update or the update-mojo where, after the recipe/version comparison succeeds, an IOException occurs while emitting the update script/report (e.g. writing to target dir or streaming to log).","commonSituations":"Read-only target/ directory; disk full; CI sandbox blocking file writes; the update script output path unwritable.","solutions":["Ensure the output location (usually target/) is writable and has free disk space.","Re-run the command; transient I/O failures often clear on retry.","Apply the recommended updates manually based on the logged report instead of the generated script.","Check antivirus/OS file locks on the output directory."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Check output directory writability before update\nPath target = projectDir.resolve(\"target\");\nFiles.createDirectories(target);\nif (!Files.isWritable(target)) throw new IllegalStateException(\"target/ not writable\");","typeGuard":null,"tryCatchPattern":"try {\n    updateHandler.execute(invocation);\n} catch (QuarkusCommandException e) {\n    if (\"Error while generating the project update script\".equals(e.getMessage()) && e.getCause() instanceof IOException) {\n        // free disk/fix permissions and retry, or apply updates manually\n    } else throw e;\n}","preventionTips":["Keep target/ writable and clean (mvn clean) before updating","Monitor free disk space in CI","Avoid read-only mounts for update commands"],"tags":["io","quarkus-cli","project-update"],"backgroundTag":"update-script-generation-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}