@@ -2347,8 +2347,7 @@ function install(version, system) {
23472347 const swiftLibPath = path . join ( systemDrive , "Library" ) ;
23482348 const swiftInstallPath = path . join ( swiftLibPath , "Developer" , "Toolchains" , "unknown-Asserts-development.xctoolchain" , "usr\\bin" ) ;
23492349 if ( code != 0 || ! fs . existsSync ( swiftInstallPath ) ) {
2350- core . setFailed ( `Swift installer failed with exit code: ${ code } ` ) ;
2351- return ;
2350+ throw new Error ( `Swift installer failed with exit code: ${ code } ` ) ;
23522351 }
23532352 core . addPath ( swiftInstallPath ) ;
23542353 const additionalPaths = [
@@ -7625,7 +7624,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
76257624 } ) ;
76267625} ;
76277626Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
7628- exports . setupVsTools = void 0 ;
7627+ exports . getVsWherePath = exports . setupVsTools = exports . vsRequirement = void 0 ;
76297628const os = __importStar ( __webpack_require__ ( 87 ) ) ;
76307629const fs = __importStar ( __webpack_require__ ( 747 ) ) ;
76317630const path = __importStar ( __webpack_require__ ( 622 ) ) ;
@@ -7649,6 +7648,7 @@ function vsRequirement({ version }) {
76497648 ] ,
76507649 } ;
76517650}
7651+ exports . vsRequirement = vsRequirement ;
76527652/// Do swift version based additional support files setup
76537653function setupSupportFiles ( { version } , vsInstallPath ) {
76547654 return __awaiter ( this , void 0 , void 0 , function * ( ) {
@@ -7675,10 +7675,10 @@ function setupVsTools(pkg) {
76757675 /// https://github.com/microsoft/vswhere/wiki/Find-MSBuild
76767676 /// get visual studio properties
76777677 const vswhereExe = yield getVsWherePath ( ) ;
7678- const requirement = vsRequirement ( pkg ) ;
7678+ const req = vsRequirement ( pkg ) ;
76797679 const vsWhereExec = `-products * ` +
76807680 `-format json -utf8 ` +
7681- `-latest -version "${ requirement . version } "` ;
7681+ `-latest -version "${ req . version } "` ;
76827682 let payload = "" ;
76837683 const options = { } ;
76847684 options . listeners = {
@@ -7693,19 +7693,17 @@ function setupVsTools(pkg) {
76937693 yield exec_1 . exec ( `"${ vswhereExe } " ${ vsWhereExec } ` , [ ] , options ) ;
76947694 let vs = JSON . parse ( payload ) [ 0 ] ;
76957695 if ( ! vs . installationPath ) {
7696- core . setFailed ( `Unable to find any visual studio installation for version: ${ requirement . version } .` ) ;
7697- return ;
7696+ throw new Error ( `Unable to find any visual studio installation for version: ${ req . version } .` ) ;
76987697 }
76997698 /// https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio?view=vs-2022
77007699 /// install required visual studio components
77017700 const vsInstallerExec = `modify --installPath "${ vs . installationPath } "` +
7702- requirement . components . reduce ( ( previous , current ) => `${ previous } --add "${ current } "` , "" ) +
7701+ req . components . reduce ( ( previous , current ) => `${ previous } --add "${ current } "` , "" ) +
77037702 ` --quiet` ;
77047703 // install required visual studio components
77057704 const code = yield exec_1 . exec ( `"${ vs . properties . setupEngineFilePath } " ${ vsInstallerExec } ` , [ ] ) ;
77067705 if ( code != 0 ) {
7707- core . setFailed ( `Visual Studio installer failed to install required components with exit code: ${ code } .` ) ;
7708- return ;
7706+ throw new Error ( `Visual Studio installer failed to install required components with exit code: ${ code } .` ) ;
77097707 }
77107708 yield setupSupportFiles ( pkg , vs . installationPath ) ;
77117709 } ) ;
@@ -7739,12 +7737,12 @@ function getVsWherePath() {
77397737 }
77407738 }
77417739 if ( ! fs . existsSync ( vswhereToolExe ) ) {
7742- core . setFailed ( "Action requires the path to where vswhere.exe exists" ) ;
7743- return ;
7740+ throw new Error ( "Action requires the path to where vswhere.exe exists" ) ;
77447741 }
77457742 return vswhereToolExe ;
77467743 } ) ;
77477744}
7745+ exports . getVsWherePath = getVsWherePath ;
77487746
77497747
77507748/***/ } ) ,
@@ -7852,7 +7850,7 @@ var OS;
78527850const AVAILABLE_OS = {
78537851 macOS : [ "latest" , "11.0" , "10.15" ] ,
78547852 Ubuntu : [ "latest" , "20.04" , "18.04" , "16.04" ] ,
7855- Windows : [ "latest" , "2022" , "2019 "] ,
7853+ Windows : [ "latest" , "10 " ] ,
78567854} ;
78577855function getSystem ( ) {
78587856 return __awaiter ( this , void 0 , void 0 , function * ( ) {
0 commit comments