Fix cli generator: prefer-pre-built belongs to download-options rather than build-options

This commit is contained in:
gemini 2025-09-01 17:45:12 +08:00 committed by Jerry Ma
parent 38ec03fe30
commit ddc9cc2237

View File

@ -379,6 +379,11 @@ const craftCommandString = computed(() => {
str += 'debug: true\n'; str += 'debug: true\n';
} }
if (preBuilt.value) {
str += 'download-options:\n';
str += ' prefer-pre-built: true\n';
}
str += '{{position_hold}}'; str += '{{position_hold}}';
if (enableUPX.value) { if (enableUPX.value) {
@ -387,9 +392,6 @@ const craftCommandString = computed(() => {
if (zts.value) { if (zts.value) {
str += ' enable-zts: true\n'; str += ' enable-zts: true\n';
} }
if (preBuilt.value) {
str += ' prefer-pre-built: true\n';
}
if (!str.endsWith('{{position_hold}}')) { if (!str.endsWith('{{position_hold}}')) {
str = str.replace('{{position_hold}}', 'build-options:\n'); str = str.replace('{{position_hold}}', 'build-options:\n');