full-dress-10026
05/13/2021, 7:19 PMcool-egg-852
05/13/2021, 7:32 PMpackage.json
solve this for you?red-match-15116
05/13/2021, 7:36 PMfull-dress-10026
05/13/2021, 7:36 PMexport function ensureVersionMatches(desiredVersion: string) {
const result = proc.spawnSync("pulumi", ["version"], {
stdio: ["pipe", "pipe", "inherit"]
});
if (result.status != 0) {
throw new pulumi.RunError(`Pulumi version check exited with non-zero status ${result.status}.`)
}
const versionString = String(result.stdout)
if (versionString != desiredVersion) {
throw new pulumi.RunError(`Pulumi current version ${versionString} does not match desired version ${desiredVersion}`)
}
return versionString
}