From 654b0fc346cfd6447ed08c8a0ca5eec6f9d23bd3 Mon Sep 17 00:00:00 2001 From: idillon Date: Tue, 17 Sep 2024 16:19:46 -0400 Subject: [PATCH] Fix: Type checking of hostWorkdir in resolveCorrespondingPath --- client/src/driver/BitBakeProjectScanner.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/driver/BitBakeProjectScanner.ts b/client/src/driver/BitBakeProjectScanner.ts index 75a0c8b5c..95eb5ec2c 100644 --- a/client/src/driver/BitBakeProjectScanner.ts +++ b/client/src/driver/BitBakeProjectScanner.ts @@ -238,8 +238,8 @@ export class BitBakeProjectScanner { if (this.containerMountPoint === undefined && !hostToContainer) { // Should only be called through scanAvailableLayers() const hostWorkdir = this.bitbakeDriver?.getBuildConfig('workingDirectory') - if (hostWorkdir === undefined) { - throw new Error('hostWorkdir is undefined') + if (typeof hostWorkdir !== 'string') { + throw new Error('hostWorkdir is not a string') } await this.scanContainerMountPoint(inputPath, hostWorkdir) }