-
Notifications
You must be signed in to change notification settings - Fork 1
Description
(Understandable if you close this as a non-issue, but I’ll have to go back to haskell-actions/setup for at least some projects.)
I switched from haskell-actions/setup to haskell/ghcup-setup, expecting a pretty-much drop-in replacement. However, for projects on old GHCs, it doesn’t work.
GHCup supports 7.10.3, 8.0.2, and 8.2.2, but the haskell/ghcup-setup step fails on ubuntu-24.04 (currently ubuntu-latest) runners. I wasn’t surprised, because haskell-actions/setup also fails on those runners. However, haskell-actions/setup works if I use ubuntu-22.04 for the runners – but haskell/ghcup-setup still doesn’t. These same GHC versions work with haskell/ghcup-setup on macos-15-intel and windows-2025 (GHC doesn’t support ARM that far back, so other runners are untested).
Here is one of the logs: https://github.com/sellout/ghc-compat-plugin/commit/7c69c58154783a149a59b5055d73fe7983dee549/checks/62906343773/logs (the errors look the same for both ubuntu-22.04 and ubuntu-24.04).
And the error:
2026-02-08T20:37:07.8873399Z �[1m�[91m[ Error ]�[0m�[0m [�]8;;https://errors.haskell.org/messages/GHCup-07971�\GHCup-07971�]8;;�\] Both installation and setting the tool failed.
2026-02-08T20:37:07.8891031Z �[1m�[91m[ ... ] �[0m�[0mInstall error was: Process "gmake" with arguments ["DESTDIR=/usr/local/.ghcup/tmp/ghcup-cf0a9b5ffbb8aa4e",
2026-02-08T20:37:07.8893242Z �[1m�[91m[ ... ] �[0m�[0m "STRIP_CMD=true",
2026-02-08T20:37:07.8895030Z �[1m�[91m[ ... ] �[0m�[0m "install"] failed with exit code 2.
2026-02-08T20:37:07.8896474Z �[1m�[91m[ ... ] �[0m�[0mSet error was: The version '8.2.2' of the tool ghc is not installed.
2026-02-08T20:37:07.8901312Z �[1m�[91m[ Error ]�[0m�[0m Also check the logs in /usr/local/.ghcup/logs
2026-02-08T20:37:07.8962286Z file:///home/runner/work/_actions/haskell/ghcup-setup/v1/ghcup/dist/index.js:58
2026-02-08T20:37:07.9041324Z Error Message: ${C.message}`)})).result)===null||Q===void 0?void 0:Q.value;if(!E)throw new Error("Response json body do not have ID Token field");return E})}static getIDToken(A){return qW(this,void 0,void 0,function*(){try{let Q=xE.getIDTokenUrl();if(A){let I=encodeURIComponent(A);Q=`${Q}&audience=${I}`}jW.debug(`ID token url is ${Q}`);let B=yield xE.getCall(Q);return jW.setSecret(B),B}catch(Q){throw new Error(`Error message: ${Q.message}`)}})}}_E.OidcClient=xE});var rN=w((UQ)=>{var sN=UQ&&UQ.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(UQ,"__esModule",{value:!0});UQ.summary=UQ.markdownSummary=UQ.SUMMARY_DOCS_URL=UQ.SUMMARY_ENV_VAR=void 0;var z$=V("os"),oN=V("fs"),{access:H$,appendFile:S$,writeFile:T$}=oN.promises;UQ.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";UQ.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class PW{constructor(){this._buffer=""}filePath(){return sN(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let A=process.env[UQ.SUMMARY_ENV_VAR];if(!A)throw new Error(`Unable to find environment variable for $${UQ.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield H$(A,oN.constants.R_OK|oN.constants.W_OK)}catch(Q){throw new Error(`Unable to access summary file: '${A}'. Check if the file has correct read/write permissions.`)}return this._filePath=A,this._filePath})}wrap(A,Q,B={}){let I=Object.entries(B).map(([E,C])=>` ${E}="${C}"`).join("");if(!Q)return`<${A}${I}>`;return`<${A}${I}>${Q}</${A}>`}write(A){return sN(this,void 0,void 0,function*(){let Q=!!(A===null||A===void 0?void 0:A.overwrite),B=yield this.filePath();return yield(Q?T$:S$)(B,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return sN(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(A,Q=!1){return this._buffer+=A,Q?this.addEOL():this}addEOL(){return this.addRaw(z$.EOL)}addCodeBlock(A,Q){let B=Object.assign({},Q&&{lang:Q}),I=this.wrap("pre",this.wrap("code",A),B);return this.addRaw(I).addEOL()}addList(A,Q=!1){let B=Q?"ol":"ul",I=A.map((C)=>this.wrap("li",C)).join(""),E=this.wrap(B,I);return this.addRaw(E).addEOL()}addTable(A){let Q=A.map((I)=>{let E=I.map((C)=>{if(typeof C==="string")return this.wrap("td",C);let{header:g,data:D,colspan:F,rowspan:Y}=C,N=g?"th":"td",J=Object.assign(Object.assign({},F&&{colspan:F}),Y&&{rowspan:Y});return this.wrap(N,D,J)}).join("");return this.wrap("tr",E)}).join(""),B=this.wrap("table",Q);return this.addRaw(B).addEOL()}addDetails(A,Q){let B=this.wrap("details",this.wrap("summary",A)+Q);return this.addRaw(B).addEOL()}addImage(A,Q,B){let{width:I,height:E}=B||{},C=Object.assign(Object.assign({},I&&{width:I}),E&&{height:E}),g=this.wrap("img",null,Object.assign({src:A,alt:Q},C));return this.addRaw(g).addEOL()}addHeading(A,Q){let B=`h${Q}`,I=["h1","h2","h3","h4","h5","h6"].includes(B)?B:"h1",E=this.wrap(I,A);return this.addRaw(E).addEOL()}addSeparator(){let A=this.wrap("hr",null);return this.addRaw(A).addEOL()}addBreak(){let A=this.wrap("br",null);return this.addRaw(A).addEOL()}addQuote(A,Q){let B=Object.assign({},Q&&{cite:Q}),I=this.wrap("blockquote",A,B);return this.addRaw(I).addEOL()}addLink(A,Q){let B=this.wrap("a",A,{href:Q});return this.addRaw(B).addEOL()}}var xW=new PW;UQ.markdownSummary=xW;UQ.summary=xW});var _W=w((GQ)=>{var $$=GQ&&GQ.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;var E=Object.getOwnPropertyDescriptor(Q,B);if(!E||("get"in E?!Q.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return Q[B]}};Object.defineProperty(A,I,E)}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),q$=GQ&&GQ.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),j$=GQ&&GQ.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.prototype.hasOwnProperty.call(A,B))$$(Q,A,B)}return q$(Q,A),Q};Object.defineProperty(GQ,"__esModule",{value:!0});GQ.toPlatformPath=GQ.toWin32Path=GQ.toPosixPath=void 0;var O$=j$(V("path"));function P$(A){return A.replace(/[\\]/g,"/")}GQ.toPosixPath=P$;function x$(A){return A.replace(/[/]/g,"\\")}GQ.toWin32Path=x$;function _$(A){return A.replace(/[/\\]/g,O$.sep)}GQ.toPlatformPath=_$});var eN=w((j)=>{var y$=j&&j.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;Object.defineProperty(A,I,{enumerable:!0,get:function(){return Q[B]}})}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),h$=j&&j.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),hW=j&&j.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.hasOwnProperty.call(A,B))y$(Q,A,B)}return h$(Q,A),Q},tN=j&&j.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})},RQ;Object.defineProperty(j,"__esModule",{value:!0});j.getCmdPath=j.tryGetExecutablePath=j.isRooted=j.isDirectory=j.exists=j.READONLY=j.UV_FS_O_EXLOCK=j.IS_WINDOWS=j.unlink=j.symlink=j.stat=j.rmdir=j.rm=j.rename=j.readlink=j.readdir=j.open=j.mkdir=j.lstat=j.copyFile=j.chmod=void 0;var kW=hW(V("fs")),QD=hW(V("path"));RQ=kW.promises,j.chmod=RQ.chmod,j.copyFile=RQ.copyFile,j.lstat=RQ.lstat,j.mkdir=RQ.mkdir,j.open=RQ.open,j.readdir=RQ.readdir,j.readlink=RQ.readlink,j.rename=RQ.rename,j.rm=RQ.rm,j.rmdir=RQ.rmdir,j.stat=RQ.stat,j.symlink=RQ.symlink,j.unlink=RQ.unlink;j.IS_WINDOWS=process.platform==="win32";j.UV_FS_O_EXLOCK=268435456;j.READONLY=kW.constants.O_RDONLY;function k$(A){return tN(this,void 0,void 0,function*(){try{yield j.stat(A)}catch(Q){if(Q.code==="ENOENT")return!1;throw Q}return!0})}j.exists=k$;function f$(A,Q=!1){return tN(this,void 0,void 0,function*(){return(Q?yield j.stat(A):yield j.lstat(A)).isDirectory()})}j.isDirectory=f$;function b$(A){if(A=m$(A),!A)throw new Error('isRooted() parameter "p" cannot be empty');if(j.IS_WINDOWS)return A.startsWith("\\")||/^[A-Z]:/i.test(A);return A.startsWith("/")}j.isRooted=b$;function v$(A,Q){return tN(this,void 0,void 0,function*(){let B=void 0;try{B=yield j.stat(A)}catch(E){if(E.code!=="ENOENT")console.log(`Unexpected error attempting to determine if executable file exists '${A}': ${E}`)}if(B&&B.isFile()){if(j.IS_WINDOWS){let E=QD.extname(A).toUpperCase();if(Q.some((C)=>C.toUpperCase()===E))return A}else if(yW(B))return A}let I=A;for(let E of Q){A=I+E,B=void 0;try{B=yield j.stat(A)}catch(C){if(C.code!=="ENOENT")console.log(`Unexpected error attempting to determine if executable file exists '${A}': ${C}`)}if(B&&B.isFile()){if(j.IS_WINDOWS){try{let C=QD.dirname(A),g=QD.basename(A).toUpperCase();for(let D of yield j.readdir(C))if(g===D.toUpperCase()){A=QD.join(C,D);break}}catch(C){console.log(`Unexpected error attempting to determine the actual case of the file '${A}': ${C}`)}return A}else if(yW(B))return A}}return""})}j.tryGetExecutablePath=v$;function m$(A){if(A=A||"",j.IS_WINDOWS)return A=A.replace(/\//g,"\\"),A.replace(/\\\\+/g,"\\");return A.replace(/\/\/+/g,"/")}function yW(A){return(A.mode&1)>0||(A.mode&8)>0&&A.gid===process.getgid()||(A.mode&64)>0&&A.uid===process.getuid()}function u$(){var A;return(A=process.env.COMSPEC)!==null&&A!==void 0?A:"cmd.exe"}j.getCmdPath=u$});var QJ=w((SA)=>{var c$=SA&&SA.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;Object.defineProperty(A,I,{enumerable:!0,get:function(){return Q[B]}})}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),d$=SA&&SA.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),fW=SA&&SA.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.hasOwnProperty.call(A,B))c$(Q,A,B)}return d$(Q,A),Q},EI=SA&&SA.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(SA,"__esModule",{value:!0});SA.findInPath=SA.which=SA.mkdirP=SA.rmRF=SA.mv=SA.cp=void 0;var p$=V("assert"),MB=fW(V("path")),BA=fW(eN());function l$(A,Q,B={}){return EI(this,void 0,void 0,function*(){let{force:I,recursive:E,copySourceDirectory:C}=n$(B),g=(yield BA.exists(Q))?yield BA.stat(Q):null;if(g&&g.isFile()&&!I)return;let D=g&&g.isDirectory()&&C?MB.join(Q,MB.basename(A)):Q;if(!(yield BA.exists(A)))throw new Error(`no such file or directory: ${A}`);if((yield BA.stat(A)).isDirectory())if(!E)throw new Error(`Failed to copy. ${A} is a directory, but tried to copy without recursive flag.`);else yield uW(A,D,0,I);else{if(MB.relative(A,D)==="")throw new Error(`'${D}' and '${A}' are the same file`);yield cW(A,D,I)}})}SA.cp=l$;function i$(A,Q,B={}){return EI(this,void 0,void 0,function*(){if(yield BA.exists(Q)){let I=!0;if(yield BA.isDirectory(Q))Q=MB.join(Q,MB.basename(A)),I=yield BA.exists(Q);if(I)if(B.force==null||B.force)yield bW(Q);else throw new Error("Destination already exists")}yield AJ(MB.dirname(Q)),yield BA.rename(A,Q)})}SA.mv=i$;function bW(A){return EI(this,void 0,void 0,function*(){if(BA.IS_WINDOWS){if(/[*"<>|]/.test(A))throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}try{yield BA.rm(A,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(Q){throw new Error(`File was unable to be removed ${Q}`)}})}SA.rmRF=bW;function AJ(A){return EI(this,void 0,void 0,function*(){p$.ok(A,"a path argument must be provided"),yield BA.mkdir(A,{recursive:!0})})}SA.mkdirP=AJ;function vW(A,Q){return EI(this,void 0,void 0,function*(){if(!A)throw new Error("parameter 'tool' is required");if(Q){let I=yield vW(A,!1);if(!I)if(BA.IS_WINDOWS)throw new Error(`Unable to locate executable file: ${A}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`);else throw new Error(`Unable to locate executable file: ${A}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);return I}let B=yield mW(A);if(B&&B.length>0)return B[0];return""})}SA.which=vW;function mW(A){return EI(this,void 0,void 0,function*(){if(!A)throw new Error("parameter 'tool' is required");let Q=[];if(BA.IS_WINDOWS&&process.env.PATHEXT){for(let E of process.env.PATHEXT.split(MB.delimiter))if(E)Q.push(E)}if(BA.isRooted(A)){let E=yield BA.tryGetExecutablePath(A,Q);if(E)return[E];return[]}if(A.includes(MB.sep))return[];let B=[];if(process.env.PATH){for(let E of process.env.PATH.split(MB.delimiter))if(E)B.push(E)}let I=[];for(let E of B){let C=yield BA.tryGetExecutablePath(MB.join(E,A),Q);if(C)I.push(C)}return I})}SA.findInPath=mW;function n$(A){let Q=A.force==null?!0:A.force,B=Boolean(A.recursive),I=A.copySourceDirectory==null?!0:Boolean(A.copySourceDirectory);return{force:Q,recursive:B,copySourceDirectory:I}}function uW(A,Q,B,I){return EI(this,void 0,void 0,function*(){if(B>=255)return;B++,yield AJ(Q);let E=yield BA.readdir(A);for(let C of E){let g=`${A}/${C}`,D=`${Q}/${C}`;if((yield BA.lstat(g)).isDirectory())yield uW(g,D,B,I);else yield cW(g,D,I)}yield BA.chmod(Q,(yield BA.stat(A)).mode)})}function cW(A,Q,B){return EI(this,void 0,void 0,function*(){if((yield BA.lstat(A)).isSymbolicLink()){try{yield BA.lstat(Q),yield BA.unlink(Q)}catch(E){if(E.code==="EPERM")yield BA.chmod(Q,"0666"),yield BA.unlink(Q)}let I=yield BA.readlink(A);yield BA.symlink(I,Q,BA.IS_WINDOWS?"junction":null)}else if(!(yield BA.exists(Q))||B)yield BA.copyFile(A,Q)})}});var nW=w((wQ)=>{var a$=wQ&&wQ.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;Object.defineProperty(A,I,{enumerable:!0,get:function(){return Q[B]}})}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),s$=wQ&&wQ.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),yE=wQ&&wQ.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.hasOwnProperty.call(A,B))a$(Q,A,B)}return s$(Q,A),Q},dW=wQ&&wQ.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(wQ,"__esModule",{value:!0});wQ.argStringToArray=wQ.ToolRunner=void 0;var BD=yE(V("os")),lW=yE(V("events")),o$=yE(V("child_process")),r$=yE(V("path")),t$=yE(QJ()),pW=yE(eN()),e$=V("timers"),ID=process.platform==="win32";class iW extends lW.EventEmitter{constructor(A,Q,B){super();if(!A)throw new Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=A,this.args=Q||[],this.options=B||{}}_debug(A){if(this.options.listeners&&this.options.listeners.debug)this.options.listeners.debug(A)}_getCommandString(A,Q){let B=this._getSpawnFileName(),I=this._getSpawnArgs(A),E=Q?"":"[command]";if(ID)if(this._isCmdFile()){E+=B;for(let C of I)E+=` ${C}`}else if(A.windowsVerbatimArguments){E+=`"${B}"`;for(let C of I)E+=` ${C}`}else{E+=this._windowsQuoteCmdArg(B);for(let C of I)E+=` ${this._windowsQuoteCmdArg(C)}`}else{E+=B;for(let C of I)E+=` ${C}`}return E}_processLineBuffer(A,Q,B){try{let I=Q+A.toString(),E=I.indexOf(BD.EOL);while(E>-1){let C=I.substring(0,E);B(C),I=I.substring(E+BD.EOL.length),E=I.indexOf(BD.EOL)}return I}catch(I){return this._debug(`error processing line. Failed with error ${I}`),""}}_getSpawnFileName(){if(ID){if(this._isCmdFile())return process.env.COMSPEC||"cmd.exe"}return this.toolPath}_getSpawnArgs(A){if(ID){if(this._isCmdFile()){let Q=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(let B of this.args)Q+=" ",Q+=A.windowsVerbatimArguments?B:this._windowsQuoteCmdArg(B);return Q+='"',[Q]}}return this.args}_endsWith(A,Q){return A.endsWith(Q)}_isCmdFile(){let A=this.toolPath.toUpperCase();return this._endsWith(A,".CMD")||this._endsWith(A,".BAT")}_windowsQuoteCmdArg(A){if(!this._isCmdFile())return this._uvQuoteCmdArg(A);if(!A)return'""';let Q=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'],B=!1;for(let C of A)if(Q.some((g)=>g===C)){B=!0;break}if(!B)return A;let I='"',E=!0;for(let C=A.length;C>0;C--)if(I+=A[C-1],E&&A[C-1]==="\\")I+="\\";else if(A[C-1]==='"')E=!0,I+='"';else E=!1;return I+='"',I.split("").reverse().join("")}_uvQuoteCmdArg(A){if(!A)return'""';if(!A.includes(" ")&&!A.includes("\t")&&!A.includes('"'))return A;if(!A.includes('"')&&!A.includes("\\"))return`"${A}"`;let Q='"',B=!0;for(let I=A.length;I>0;I--)if(Q+=A[I-1],B&&A[I-1]==="\\")Q+="\\";else if(A[I-1]==='"')B=!0,Q+="\\";else B=!1;return Q+='"',Q.split("").reverse().join("")}_cloneExecOptions(A){A=A||{};let Q={cwd:A.cwd||process.cwd(),env:A.env||process.env,silent:A.silent||!1,windowsVerbatimArguments:A.windowsVerbatimArguments||!1,failOnStdErr:A.failOnStdErr||!1,ignoreReturnCode:A.ignoreReturnCode||!1,delay:A.delay||1e4};return Q.outStream=A.outStream||process.stdout,Q.errStream=A.errStream||process.stderr,Q}_getSpawnOptions(A,Q){A=A||{};let B={};if(B.cwd=A.cwd,B.env=A.env,B.windowsVerbatimArguments=A.windowsVerbatimArguments||this._isCmdFile(),A.windowsVerbatimArguments)B.argv0=`"${Q}"`;return B}exec(){return dW(this,void 0,void 0,function*(){if(!pW.isRooted(this.toolPath)&&(this.toolPath.includes("/")||ID&&this.toolPath.includes("\\")))this.toolPath=r$.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath);return this.toolPath=yield t$.which(this.toolPath,!0),new Promise((A,Q)=>dW(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`),this._debug("arguments:");for(let F of this.args)this._debug(` ${F}`);let B=this._cloneExecOptions(this.options);if(!B.silent&&B.outStream)B.outStream.write(this._getCommandString(B)+BD.EOL);let I=new BJ(B,this.toolPath);if(I.on("debug",(F)=>{this._debug(F)}),this.options.cwd&&!(yield pW.exists(this.options.cwd)))return Q(new Error(`The cwd: ${this.options.cwd} does not exist!`));let E=this._getSpawnFileName(),C=o$.spawn(E,this._getSpawnArgs(B),this._getSpawnOptions(this.options,E)),g="";if(C.stdout)C.stdout.on("data",(F)=>{if(this.options.listeners&&this.options.listeners.stdout)this.options.listeners.stdout(F);if(!B.silent&&B.outStream)B.outStream.write(F);g=this._processLineBuffer(F,g,(Y)=>{if(this.options.listeners&&this.options.listeners.stdline)this.options.listeners.stdline(Y)})});let D="";if(C.stderr)C.stderr.on("data",(F)=>{if(I.processStderr=!0,this.options.listeners&&this.options.listeners.stderr)this.options.listeners.stderr(F);if(!B.silent&&B.errStream&&B.outStream)(B.failOnStdErr?B.errStream:B.outStream).write(F);D=this._processLineBuffer(F,D,(Y)=>{if(this.options.listeners&&this.options.listeners.errline)this.options.listeners.errline(Y)})});if(C.on("error",(F)=>{I.processError=F.message,I.processExited=!0,I.processClosed=!0,I.CheckComplete()}),C.on("exit",(F)=>{I.processExitCode=F,I.processExited=!0,this._debug(`Exit code ${F} received from tool '${this.toolPath}'`),I.CheckComplete()}),C.on("close",(F)=>{I.processExitCode=F,I.processExited=!0,I.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),I.CheckComplete()}),I.on("done",(F,Y)=>{if(g.length>0)this.emit("stdline",g);if(D.length>0)this.emit("errline",D);if(C.removeAllListeners(),F)Q(F);else A(Y)}),this.options.input){if(!C.stdin)throw new Error("child process missing stdin");C.stdin.end(this.options.input)}}))})}}wQ.ToolRunner=iW;function Aq(A){let Q=[],B=!1,I=!1,E="";function C(g){if(I&&g!=='"')E+="\\";E+=g,I=!1}for(let g=0;g<A.length;g++){let D=A.charAt(g);if(D==='"'){if(!I)B=!B;else C(D);continue}if(D==="\\"&&I){C(D);continue}if(D==="\\"&&B){I=!0;continue}if(D===" "&&!B){if(E.length>0)Q.push(E),E="";continue}C(D)}if(E.length>0)Q.push(E.trim());return Q}wQ.argStringToArray=Aq;class BJ extends lW.EventEmitter{constructor(A,Q){super();if(this.processClosed=!1,this.processError="",this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!Q)throw new Error("toolPath must not be empty");if(this.options=A,this.toolPath=Q,A.delay)this.delay=A.delay}CheckComplete(){if(this.done)return;if(this.processClosed)this._setResult();else if(this.processExited)this.timeout=e$.setTimeout(BJ.HandleTimeout,this.delay,this)}_debug(A){this.emit("debug",A)}_setResult(){let A;if(this.processExited){if(this.processError)A=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`);else if(this.processExitCode!==0&&!this.options.ignoreReturnCode)A=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);else if(this.processStderr&&this.options.failOnStdErr)A=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}if(this.timeout)clearTimeout(this.timeout),this.timeout=null;this.done=!0,this.emit("done",A,this.processExitCode)}static HandleTimeout(A){if(A.done)return;if(!A.processClosed&&A.processExited){let Q=`The STDIO streams did not close within ${A.delay/1000} seconds of the exit event from process '${A.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;A._debug(Q)}A._setResult()}}});var ED=w((LQ)=>{var Qq=LQ&&LQ.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;Object.defineProperty(A,I,{enumerable:!0,get:function(){return Q[B]}})}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),Bq=LQ&&LQ.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),Iq=LQ&&LQ.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.hasOwnProperty.call(A,B))Qq(Q,A,B)}return Bq(Q,A),Q},oW=LQ&&LQ.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(LQ,"__esModule",{value:!0});LQ.getExecOutput=LQ.exec=void 0;var aW=V("string_decoder"),sW=Iq(nW());function rW(A,Q,B){return oW(this,void 0,void 0,function*(){let I=sW.argStringToArray(A);if(I.length===0)throw new Error("Parameter 'commandLine' cannot be null or empty.");let E=I[0];return Q=I.slice(1).concat(Q||[]),new sW.ToolRunner(E,Q,B).exec()})}LQ.exec=rW;function Eq(A,Q,B){var I,E;return oW(this,void 0,void 0,function*(){let C="",g="",D=new aW.StringDecoder("utf8"),F=new aW.StringDecoder("utf8"),Y=(I=B===null||B===void 0?void 0:B.listeners)===null||I===void 0?void 0:I.stdout,N=(E=B===null||B===void 0?void 0:B.listeners)===null||E===void 0?void 0:E.stderr,J=(G)=>{if(g+=F.write(G),N)N(G)},U=(G)=>{if(C+=D.write(G),Y)Y(G)},R=Object.assign(Object.assign({},B===null||B===void 0?void 0:B.listeners),{stdout:U,stderr:J}),L=yield rW(A,Q,Object.assign(Object.assign({},B),{listeners:R}));return C+=D.end(),g+=F.end(),{exitCode:L,stdout:C,stderr:g}})}LQ.getExecOutput=Eq});var eW=w((r)=>{var Cq=r&&r.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;var E=Object.getOwnPropertyDescriptor(Q,B);if(!E||("get"in E?!Q.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return Q[B]}};Object.defineProperty(A,I,E)}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),gq=r&&r.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),Dq=r&&r.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.prototype.hasOwnProperty.call(A,B))Cq(Q,A,B)}return gq(Q,A),Q},gD=r&&r.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})},Fq=r&&r.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(r,"__esModule",{value:!0});r.getDetails=r.isLinux=r.isMacOS=r.isWindows=r.arch=r.platform=void 0;var tW=Fq(V("os")),CD=Dq(ED()),Yq=()=>gD(void 0,void 0,void 0,function*(){let{stdout:A}=yield CD.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',void 0,{silent:!0}),{stdout:Q}=yield CD.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',void 0,{silent:!0});return{name:Q.trim(),version:A.trim()}}),Nq=()=>gD(void 0,void 0,void 0,function*(){var A,Q,B,I;let{stdout:E}=yield CD.getExecOutput("sw_vers",void 0,{silent:!0}),C=(Q=(A=E.match(/ProductVersion:\s*(.+)/))===null||A===void 0?void 0:A[1])!==null&&Q!==void 0?Q:"";return{name:(I=(B=E.match(/ProductName:\s*(.+)/))===null||B===void 0?void 0:B[1])!==null&&I!==void 0?I:"",version:C}}),Jq=()=>gD(void 0,void 0,void 0,function*(){let{stdout:A}=yield CD.getExecOutput("lsb_release",["-i","-r","-s"],{silent:!0}),[Q,B]=A.trim().split(`