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 ut(e,t,r);process.stdout.write(""+n+lt.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={}){ot.issueCommand("error",ct.toCommandProperties(t),e instanceof Error?""+e:e)}function i(e){ot.issue("group",e)}function s(){ot.issue("endgroup")}function a(e,t,r){return Xt(this,void 0,void 0,(function*(){const n=zt.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 zt.ToolRunner(o,t,r).exec()}))}function l(e,t){const r=[];t=t||kt.arch();const n=jt.join(f(),e);if(Lt.existsSync(n)){const e=Lt.readdirSync(n);for(const o of e)if(d(o)){const e=jt.join(n,o,t||"");Lt.existsSync(e)&&Lt.existsSync(e+".complete")&&r.push(o)}}return r}function c(e){return It(this,void 0,void 0,(function*(){return e||(e=jt.join(m(),Vt.default())),yield Nt.mkdirP(e),e}))}function u(e,t,r){return It(this,void 0,void 0,(function*(){const n=jt.join(f(),e,Mt.clean(t)||t,r||"");At.debug("destination "+n);const o=n+".complete";return yield Nt.rmRF(n),yield Nt.rmRF(o),yield Nt.mkdirP(n),n}))}function p(e,t,r){const n=jt.join(f(),e,Mt.clean(t)||t,r||"");Lt.writeFileSync(n+".complete",""),At.debug("finished caching tool")}function d(e){const t=Mt.clean(e)||"";At.debug("isExplicit: "+t);const r=null!=Mt.valid(t);return At.debug("explicit? "+r),r}function h(e,t){let r="";At.debug(`evaluating ${e.length} versions`);for(let n=(e=e.sort(((e,t)=>Mt.gt(e,t)?1:-1))).length-1;n>=0;n--){const o=e[n];if(Mt.satisfies(o,t)){r=o;break}}return At.debug(r?"matched: "+r:"match not found"),r}function f(){const e=process.env.RUNNER_TOOL_CACHE||"";return je.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function m(){const e=process.env.RUNNER_TEMP||"";return je.ok(e,"Expected RUNNER_TEMP to be defined"),e}function v(e,t){const r=Ye[e];return void 0!==r?r:t}function g(){return"true"===process.env.CI&&"true"===process.env.GITHUB_ACTIONS}function y(e){return g()?Qe.error(e):console.log(`${e}`)}function w(e){return g()?Qe.warning(e):console.log(`${e}`)}function x(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)=>{x(e,t||{},((e,t)=>{e?n(e):r(t)}))}))}ar(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 dr)return{binDir:dr};const o=t(or).sync("brew",{nothrow:!0});return null!==o?(dr=Ge.dirname(o),{binDir:dr}):(Ve.execFileSync('/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"',{stdio:"inherit"}),dr="/usr/local/bin/",{binDir:dr})}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=or.sync(e.command,{path:r[gr({env:r})],pathExt:t?Ge.delimiter:void 0})}catch(e){}finally{i&&process.chdir(n)}return s&&(s=Ge.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 $r&&1===e&&!t.file?S(t.original,"spawn"):null}function P(e,t,r){const n=vr(e,t,r),o=Ve.spawn(n.command,n.args,n.options);return Or.hookChildProcess(o,n),o}function O(){sn&&(sn=!1,tn.forEach((e=>{try{process.removeListener(e,on[e])}catch(e){}})),process.emit=ln,process.reallyExit=an,en.count-=1)}function $(e,t,r){en.emitted[e]||(en.emitted[e]=!0,en.emit(e,t,r))}function C(){sn||(sn=!0,en.count+=1,tn=tn.filter((e=>{try{return process.on(e,on[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