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 lt(e,t,r);process.stdout.write(""+n+st.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={}){rt.issueCommand("error",at.toCommandProperties(t),e instanceof Error?""+e:e)}function i(e){rt.issue("group",e)}function s(){rt.issue("endgroup")}function a(e,t,r){return qt(this,void 0,void 0,(function*(){const n=Wt.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 Wt.ToolRunner(o,t,r).exec()}))}function l(e,t){const r=[];t=t||Lt.arch();const n=Dt.join(f(),e);if(At.existsSync(n)){const e=At.readdirSync(n);for(const o of e)if(d(o)){const e=Dt.join(n,o,t||"");At.existsSync(e)&&At.existsSync(e+".complete")&&r.push(o)}}return r}function c(e){return Ct(this,void 0,void 0,(function*(){return e||(e=Dt.join(m(),Ut.default())),yield Rt.mkdirP(e),e}))}function u(e,t,r){return Ct(this,void 0,void 0,(function*(){const n=Dt.join(f(),e,jt.clean(t)||t,r||"");It.debug("destination "+n);const o=n+".complete";return yield Rt.rmRF(n),yield Rt.rmRF(o),yield Rt.mkdirP(n),n}))}function p(e,t,r){const n=Dt.join(f(),e,jt.clean(t)||t,r||"");At.writeFileSync(n+".complete",""),It.debug("finished caching tool")}function d(e){const t=jt.clean(e)||"";It.debug("isExplicit: "+t);const r=null!=jt.valid(t);return It.debug("explicit? "+r),r}function h(e,t){let r="";It.debug(`evaluating ${e.length} versions`);for(let n=(e=e.sort(((e,t)=>jt.gt(e,t)?1:-1))).length-1;n>=0;n--){const o=e[n];if(jt.satisfies(o,t)){r=o;break}}return It.debug(r?"matched: "+r:"match not found"),r}function f(){const e=process.env.RUNNER_TOOL_CACHE||"";return De.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function m(){const e=process.env.RUNNER_TEMP||"";return De.ok(e,"Expected RUNNER_TEMP to be defined"),e}function v(e,t){const r=Xe[e];return void 0!==r?r:t}function g(){return"true"===process.env.CI&&"true"===process.env.GITHUB_ACTIONS}function y(e){return g()?Je.error(e):console.log(`${e}`)}function x(e){return g()?Je.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)}))}))}ir(e,t||{},((e,n)=>{e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}function b(e,r,n){if(!["darwin","linux"].includes(process.platform))return;if("string"==typeof ur)return{binDir:ur};const o=t(rr).sync("brew",{nothrow:!0});return null!==o?(ur=Me.dirname(o),{binDir:ur}):(Ue.execFileSync('/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"',{stdio:"inherit"}),ur="/usr/local/bin/",{binDir:ur})}function E(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=rr.sync(e.command,{path:r[mr({env:r})],pathExt:t?Me.delimiter:void 0})}catch(e){}finally{i&&process.chdir(n)}return s&&(s=Me.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 Pr&&1===e&&!t.file?S(t.original,"spawn"):null}function P(e,t,r){const n=fr(e,t,r),o=Ue.spawn(n.command,n.args,n.options);return _r.hookChildProcess(o,n),o}function O(){nn&&(nn=!1,Qr.forEach((e=>{try{process.removeListener(e,rn[e])}catch(e){}})),process.emit=sn,process.reallyExit=on,Zr.count-=1)}function $(e,t,r){Zr.emitted[e]||(Zr.emitted[e]=!0,Zr.emit(e,t,r))}function C(){nn||(nn=!0,Zr.count+=1,Qr=Qr.filter((e=>{try{return process.on(e,rn[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