Compare commits

..
Author SHA1 Message Date
Chet HuskandCopilot App ea1f75da7f Add info-level logging for MSBuild path, version, and architecture (#79)
Upgrades key diagnostics from core.debug to core.info so they are
visible by default (not just with ACTIONS_STEP_DEBUG), matching the
request in #79:
- Log the resolved MSBuild path
- Log the resolved MSBuild version (via MSBuild.exe -version -nologo,
  wrapped in try/catch so a failure to obtain it doesn't fail the action)
- Log the architecture used

Other existing debug logs are left unchanged. Rebuilt dist/ via
npm run build && npm run pack.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-21 16:19:59 -05:00
3 changed files with 43 additions and 9 deletions

No files matched your search

+18 -1
View File
@@ -114,13 +114,30 @@ function run() {
core.setFailed('Unable to find MSBuild.');
return;
}
core.info(`Found MSBuild tool path: ${foundToolPath}`);
core.info(`Using MSBuild architecture: ${MSBUILD_ARCH}`);
// try to get the MSBuild version for diagnostic purposes; a failure here shouldn't fail the action
try {
let msbuildVersion = '';
const versionOptions = {};
versionOptions.listeners = {
stdout: (data) => {
msbuildVersion += data.toString();
}
};
yield exec.exec(`"${foundToolPath}" -version -nologo`, [], versionOptions);
core.info(`Found MSBuild version: ${msbuildVersion.trim()}`);
}
catch (error) {
core.debug(`Unable to determine MSBuild version: ${error.message}`);
}
// extract the folder location for the tool
const toolFolderPath = path.dirname(foundToolPath);
// set the outputs for the action to the folder path of msbuild
core.setOutput('msbuildPath', toolFolderPath);
// add tool path to PATH
core.addPath(toolFolderPath);
core.debug(`Tool path added to PATH: ${toolFolderPath}`);
core.info(`Tool path added to PATH: ${toolFolderPath}`);
}
catch (error) {
core.setFailed(error.message);
+6 -7
View File
@@ -1292,11 +1292,10 @@
}
},
"node_modules/brace-expansion": {
"version": "1.1.18",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz",
"integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==",
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -9238,9 +9237,9 @@
}
},
"brace-expansion": {
"version": "1.1.18",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz",
"integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==",
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
+19 -1
View File
@@ -118,6 +118,24 @@ async function run(): Promise<void> {
return
}
core.info(`Found MSBuild tool path: ${foundToolPath}`)
core.info(`Using MSBuild architecture: ${MSBUILD_ARCH}`)
// try to get the MSBuild version for diagnostic purposes; a failure here shouldn't fail the action
try {
let msbuildVersion = ''
const versionOptions: ExecOptions = {}
versionOptions.listeners = {
stdout: (data: Buffer) => {
msbuildVersion += data.toString()
}
}
await exec.exec(`"${foundToolPath}" -version -nologo`, [], versionOptions)
core.info(`Found MSBuild version: ${msbuildVersion.trim()}`)
} catch (error) {
core.debug(`Unable to determine MSBuild version: ${error.message}`)
}
// extract the folder location for the tool
const toolFolderPath = path.dirname(foundToolPath)
@@ -126,7 +144,7 @@ async function run(): Promise<void> {
// add tool path to PATH
core.addPath(toolFolderPath)
core.debug(`Tool path added to PATH: ${toolFolderPath}`)
core.info(`Tool path added to PATH: ${toolFolderPath}`)
} catch (error) {
core.setFailed(error.message)
}