From f3ce65e7270dbdc77d6b21205b779d597ea56df0 Mon Sep 17 00:00:00 2001 From: Tim deBoer Date: Wed, 10 Jan 2024 16:00:33 -0500 Subject: [PATCH] fix: recursive mkdir, linting Signed-off-by: Tim deBoer --- src/extension.ts | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 3acb0226..61dc281a 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -32,15 +32,12 @@ export async function activate(extensionContext: ExtensionContext): Promise { - launchVfkit('/Users/cdrage/bootc/image/disk.raw'); + await launchVfkit('/Users/cdrage/bootc/image/disk.raw'); }), extensionApi.commands.registerCommand('bootc.image.build', async image => { const selectedType = await extensionApi.window.showQuickPick(['qcow2', 'ami', 'raw', 'iso'], { @@ -96,12 +93,10 @@ export async function activate(extensionContext: ExtensionContext): Promise { logData += data;console.log('log:' +logData) }); + await logContainer(image, containerId, progress, data => { + logData += data; + console.log('log:' + logData); + }); // Wait for container to exit so that the task doesn't end and we can monitor progress let containerRunning = true; @@ -139,23 +137,25 @@ export async function activate(extensionContext: ExtensionContext): Promise { +/*async function convertToRaw(imagePath: string, imagePathOutput: string): Promise { const command = 'qemu-img'; const args = ['convert', '-f', 'qcow2', '-O', 'raw', imagePath, imagePathOutput]; console.log(args); @@ -187,7 +187,7 @@ async function convertToRaw(imagePath: string, imagePathOutput: string): Promise console.error(error); await extensionApi.window.showErrorMessage(`Unable to convert ${imagePath} to raw: ${error}`); } -} +}*/ /* @@ -278,7 +278,6 @@ async function pullBootcImageBuilderImage() { } async function createImage(image, type, folder: string) { - // TEMPORARY UNTIL PR IS MERGED IN BOOTC-IMAGE-BUILDER // If type is raw, change it to ami if (type === 'raw') { @@ -330,7 +329,7 @@ async function logContainer(image, containerId: string, progress, callback: (dat await extensionApi.containerEngine.logsContainer(image.engineId, containerId, (_name: string, data: string) => { if (data) { callback(data); - // look for specific output to mark incremental progress + // look for specific output to mark incremental progress if (data.includes('org.osbuild.rpm')) { progress.report({ increment: 8 }); } else if (data.includes('org.osbuild.selinux')) {