diff options
-rw-r--r-- | lib/base-compiler.ts | 4 | ||||
-rw-r--r-- | test/base-compiler-tests.js | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/base-compiler.ts b/lib/base-compiler.ts index 494e2e7f0..1689eac81 100644 --- a/lib/base-compiler.ts +++ b/lib/base-compiler.ts @@ -2366,7 +2366,7 @@ but nothing was dumped. Possible causes are: return GCCParser; } - getVersion() { + async getVersion() { logger.info(`Gathering ${this.compiler.id} version information on ${this.compiler.exe}...`); if (this.compiler.explicitVersion) { logger.debug(`${this.compiler.id} has forced version output: ${this.compiler.explicitVersion}`); @@ -2378,7 +2378,7 @@ but nothing was dumped. Possible causes are: execOptions.ldPath = this.getSharedLibraryPathsAsLdLibraryPaths([]); try { - return this.execCompilerCached(this.compiler.exe, [versionFlag], execOptions); + return await this.execCompilerCached(this.compiler.exe, [versionFlag], execOptions); } catch (err) { logger.error(`Unable to get version for compiler '${this.compiler.exe}' - ${err}`); return null; diff --git a/test/base-compiler-tests.js b/test/base-compiler-tests.js index 8c5e4a73b..abb79d285 100644 --- a/test/base-compiler-tests.js +++ b/test/base-compiler-tests.js @@ -113,10 +113,11 @@ describe('Basic compiler invariants', function () { testIncludeNotG('#include <../fish.config> // for std::is_same_v<...>'); testIncludeNotG('#include <./> // for std::ranges::range<...> and std::ranges::range_type_v<...>'); }); - it('should skip version check if forced to', () => { + it('should skip version check if forced to', async () => { const newConfig = {...info, explicitVersion: '123'}; const forcedVersionCompiler = new BaseCompiler(newConfig, ce); - forcedVersionCompiler.getVersion().stdout.should.deep.equal(['123']); + const result = await forcedVersionCompiler.getVersion(); + result.stdout.should.deep.equal(['123']); }); }); |