mirror of
https://github.com/microsoft/setup-msbuild.git
synced 2026-10-05 16:44:15 +07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea1f75da7f |
No files matched your search
Vendored
+18
-1
@@ -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);
|
||||
|
||||
Generated
+4880
-14840
File diff suppressed because it is too large.
Load diff
+2
-2
@@ -40,11 +40,11 @@
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-plugin-github": "^2.0.0",
|
||||
"eslint-plugin-jest": "^22.21.0",
|
||||
"jest": "^30.5.1",
|
||||
"jest": "^24.9.0",
|
||||
"jest-circus": "^24.9.0",
|
||||
"js-yaml": "^3.13.1",
|
||||
"prettier": "^1.19.1",
|
||||
"ts-jest": "^29.4.12",
|
||||
"ts-jest": "^24.2.0",
|
||||
"typescript": "^3.6.4"
|
||||
}
|
||||
}
|
||||
+19
-1
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user