mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 11:30:12 +08:00
2 files changed
+26
-25
No files matched your search
@@ -17,7 +17,6 @@ buildImages()
|
|||||||
.then((result) => {
|
.then((result) => {
|
||||||
logger.info(result)
|
logger.info(result)
|
||||||
logger.info('Done!')
|
logger.info('Done!')
|
||||||
process.exit(0)
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
logger.error(err)
|
logger.error(err)
|
||||||
|
|||||||
@@ -109,31 +109,33 @@ export function buildQuestImage(questPath, questId) {
|
|||||||
if (err) {
|
if (err) {
|
||||||
reject(err)
|
reject(err)
|
||||||
}
|
}
|
||||||
response.on('data', (data) => {
|
if (response) {
|
||||||
// Process the data (this could be Docker build output)
|
response.on('data', (data) => {
|
||||||
try {
|
// Process the data (this could be Docker build output)
|
||||||
data
|
try {
|
||||||
.toString()
|
data
|
||||||
.split('\n')
|
.toString()
|
||||||
.map((line) => line.trim())
|
.split('\n')
|
||||||
.filter((line) => line !== '')
|
.map((line) => line.trim())
|
||||||
.forEach((line) => {
|
.filter((line) => line !== '')
|
||||||
parseJSONOutput(line)
|
.forEach((line) => {
|
||||||
})
|
parseJSONOutput(line)
|
||||||
} catch (error) {
|
})
|
||||||
|
} catch (error) {
|
||||||
|
reject(error)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
response.on('end', () => {
|
||||||
|
logger.info(`Build completed for ${questId}`)
|
||||||
|
resolve(questId)
|
||||||
|
})
|
||||||
|
|
||||||
|
response.on('error', (error) => {
|
||||||
|
logger.error(`Build failed for ${questId}:`, error)
|
||||||
reject(error)
|
reject(error)
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
|
|
||||||
response.on('end', () => {
|
|
||||||
logger.info(`Build completed for ${questId}`)
|
|
||||||
resolve(questId)
|
|
||||||
})
|
|
||||||
|
|
||||||
response.on('error', (error) => {
|
|
||||||
logger.error(`Build failed for ${questId}:`, error)
|
|
||||||
reject(error)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in new issue
Block a user