Skip to content

Commit

Permalink
fix: visual studio components installation failure will not fail action
Browse files Browse the repository at this point in the history
  • Loading branch information
soumyamahunt committed Sep 5, 2023
1 parent 8cb6c2a commit 0afea3d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 11 additions & 7 deletions src/utils/visual_studio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,17 @@ export async function setupVisualStudioTools(
core.debug(
`Installing Visual Studio components "${requirement.components}" at "${vs.installationPath}"`
)
const code = await exec(`"${vs.properties.setupEngineFilePath}"`, [
'modify',
'--installPath',
vs.installationPath,
...requirement.components.flatMap(component => ['--add', component]),
'--quiet'
])
const code = await exec(
`"${vs.properties.setupEngineFilePath}"`,
[
'modify',
'--installPath',
vs.installationPath,
...requirement.components.flatMap(component => ['--add', component]),
'--quiet'
],
{ignoreReturnCode: true}
)
if (code !== 0) {
throw new Error(
`Visual Studio installer failed to install required components with exit code: ${code}.`
Expand Down

0 comments on commit 0afea3d

Please sign in to comment.