diff --git a/src/runtimes/go/index.ts b/src/runtimes/go/index.ts index b9a85e008..432d0627b 100644 --- a/src/runtimes/go/index.ts +++ b/src/runtimes/go/index.ts @@ -134,6 +134,13 @@ const zipFunction: ZipFunction = async function ({ } } + const result = { + config, + displayName: config?.name, + generator: config?.generator || getInternalValue(isInternal), + runtimeVersion: featureFlags.zisi_golang_use_al2 ? 'provided.al2' : undefined, + } + // If `zipGo` is enabled, we create a zip archive with the Go binary and the // toolchain file. if (config.zipGo) { @@ -147,10 +154,9 @@ const zipFunction: ZipFunction = async function ({ await zipBinary({ ...zipOptions, srcPath: binary.path, stat: binary.stat }) return { - config, + ...result, path: zipPath, entryFilename: zipOptions.filename, - runtimeVersion: featureFlags.zisi_golang_use_al2 ? 'provided.al2' : undefined, } } @@ -162,11 +168,9 @@ const zipFunction: ZipFunction = async function ({ } return { - config, + ...result, path: destPath, entryFilename: '', - displayName: config?.name, - generator: config?.generator || getInternalValue(isInternal), } }