await is more readable than the explicit use of promises. Also, this works towards flipping strictNullChecks to true, because TypeScript complains a bit less about the promisified execFile than about explicit uses of callbacks and promises.
While at it, this commit also moves the getBazelInfo function from debugger/client.ts over to the BazelInfo class, where it can be more easily reused. This has the nice side-effect, that also this info call will now respect any startupOptions potentially configured by the user.
await
is more readable than the explicit use of promises. Also, this works towards flippingstrictNullChecks
to true, because TypeScript complains a bit less about the promisifiedexecFile
than about explicit uses of callbacks and promises.While at it, this commit also moves the
getBazelInfo
function fromdebugger/client.ts
over to theBazelInfo
class, where it can be more easily reused. This has the nice side-effect, that also thisinfo
call will now respect anystartupOptions
potentially configured by the user.