Skip to content

Commit 7092c4b

Browse files
committed
fix: print choco logs in case of an error
1 parent 3387078 commit 7092c4b

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

dist/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/msvc/msvc.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { setupChocoPack } from "../utils/setup/setupChocoPack"
22
import { error } from "@actions/core"
33
import { setupVCVarsall } from "../vcvarsall/vcvarsall"
4+
import { readFileSync } from "fs"
45

56
type MSVCVersion = "2015" | "2017" | "2019" | string
67

@@ -35,6 +36,8 @@ export async function setupMSVC(
3536
}
3637
} catch (e) {
3738
error(e as string | Error)
39+
const choco_logs = readFileSync(`${process.env.ALLUSERSPROFILE}\\chocolatey\\logs\\chocolatey.log`, "utf8")
40+
console.log(choco_logs)
3841
}
3942
// run vcvarsall.bat environment variables
4043
setupVCVarsall(VCTargetsPath, arch, toolset, sdk, uwp, spectre)

0 commit comments

Comments
 (0)