setup-cpp/dist/setup_cpp.js

3 lines
155 KiB
JavaScript
Raw Normal View History

function e(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function t(e){return e&&e.__esModule?e.default:e}function r(e,t,r){const n=new ct(e,t,r);process.stdout.write(""+n+at.EOL)}function n(e,t){const r=process.env["INPUT_"+e.replace(/ /g,"_").toUpperCase()]||"";if(t&&t.required&&!r)throw Error("Input required and not supplied: "+e);return t&&!1===t.trimWhitespace?r:r.trim()}function o(e,t={}){nt.issueCommand("error",lt.toCommandProperties(t),e instanceof Error?""+e:e)}function i(e){nt.issue("group",e)}function s(){nt.issue("endgroup")}function a(e,t,r){return Wt(this,void 0,void 0,(function*(){const n=Xt.argStringToArray(e);if(0===n.length)throw Error("Parameter 'commandLine' cannot be null or empty.");const o=n[0];return t=n.slice(1).concat(t||[]),new Xt.ToolRunner(o,t,r).exec()}))}function l(e,t){const r=[];t=t||Dt.arch();const n=kt.join(f(),e);if(Nt.existsSync(n)){const e=Nt.readdirSync(n);for(const o of e)if(d(o)){const e=kt.join(n,o,t||"");Nt.existsSync(e)&&Nt.existsSync(e+".complete")&&r.push(o)}}return r}function c(e){return Tt(this,void 0,void 0,(function*(){return e||(e=kt.join(m(),Gt.default())),yield At.mkdirP(e),e}))}function u(e,t,r){return Tt(this,void 0,void 0,(function*(){const n=kt.join(f(),e,Ft.clean(t)||t,r||"");Rt.debug("destination "+n);const o=n+".complete";return yield At.rmRF(n),yield At.rmRF(o),yield At.mkdirP(n),n}))}function p(e,t,r){const n=kt.join(f(),e,Ft.clean(t)||t,r||"");Nt.writeFileSync(n+".complete",""),Rt.debug("finished caching tool")}function d(e){const t=Ft.clean(e)||"";Rt.debug("isExplicit: "+t);const r=null!=Ft.valid(t);return Rt.debug("explicit? "+r),r}function h(e,t){let r="";Rt.debug(`evaluating ${e.length} versions`);for(let n=(e=e.sort(((e,t)=>Ft.gt(e,t)?1:-1))).length-1;n>=0;n--){const o=e[n];if(Ft.satisfies(o,t)){r=o;break}}return Rt.debug(r?"matched: "+r:"match not found"),r}function f(){const e=process.env.RUNNER_TOOL_CACHE||"";return ke.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function m(){const e=process.env.RUNNER_TEMP||"";return ke.ok(e,"Expected RUNNER_TEMP to be defined"),e}function v(e,t){const r=ze[e];return void 0!==r?r:t}function g(){return"true"===process.env.CI&&"true"===process.env.GITHUB_ACTIONS}function y(e){return g()?Ze.error(e):console.log(`${e}`)}function x(e){return g()?Ze.warning(e):console.log(`${e}`)}function w(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(((r,n)=>{w(e,t||{},((e,t)=>{e?n(e):r(t)}))}))}sr(e,t||{},((e,n)=>{e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}function E(e,r,n){if(!["darwin","linux"].includes(process.platform))return;if("string"==typeof pr)return{binDir:pr};const o=t(nr).sync("brew",{nothrow:!0});return null!==o?(pr=Ue.dirname(o),{binDir:pr}):(Ge.execFileSync('/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"',{stdio:"inherit"}),pr="/usr/local/bin/",{binDir:pr})}function b(e,t){const r=e.options.env||process.env,n=process.cwd(),o=null!=e.options.cwd,i=o&&void 0!==process.chdir&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch(e){}let s;try{s=nr.sync(e.command,{path:r[vr({env:r})],pathExt:t?Ue.delimiter:void 0})}catch(e){}finally{i&&process.chdir(n)}return s&&(s=Ue.resolve(o?e.options.cwd:"",s)),s}function S(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function _(e,t){return Or&&1===e&&!t.file?S(t.original,"spawn"):null}function P(e,t,r){const n=mr(e,t,r),o=Ge.spawn(n.command,n.args,n.options);return Pr.hookChildProcess(o,n),o}function O(){on&&(on=!1,en.forEach((e=>{try{process.removeListener(e,nn[e])}catch(e){}})),process.emit=an,process.reallyExit=sn,Qr.count-=1)}function $(e,t,r){Qr.emitted[e]||(Qr.emitted[e]=!0,Qr.emit(e,t,r))}function C(){on||(on=!0,Qr.count+=1,en=en.filter((e=>{try{return process.on(e,nn[e]),!0}catch(e){return!1}})),process.emit=I,process.reallyExit=T)}functi
2021-09-18 04:00:26 +08:00
//# sourceMappingURL=setup_cpp.js.map