setup-cpp/dist/setup_cpp.js

3 lines
152 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 tt(e,t,r);process.stdout.write(""+n+Qe.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={}){ze.issueCommand("error",et.toCommandProperties(t),e instanceof Error?""+e:e)}function s(e){ze.issue("group",e)}function i(){ze.issue("endgroup")}function a(e,t,r){return Ft(this,void 0,void 0,(function*(){const n=Mt.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 Mt.ToolRunner(o,t,r).exec()}))}function c(e,t){const r=[];t=t||Ct.arch();const n=Tt.join(f(),e);if(Ot.existsSync(n)){const e=Ot.readdirSync(n);for(const o of e)if(d(o)){const e=Tt.join(n,o,t||"");Ot.existsSync(e)&&Ot.existsSync(e+".complete")&&r.push(o)}}return r}function l(e){return Et(this,void 0,void 0,(function*(){return e||(e=Tt.join(m(),Nt.default())),yield Pt.mkdirP(e),e}))}function u(e,t,r){return Et(this,void 0,void 0,(function*(){const n=Tt.join(f(),e,It.clean(t)||t,r||"");St.debug("destination "+n);const o=n+".complete";return yield Pt.rmRF(n),yield Pt.rmRF(o),yield Pt.mkdirP(n),n}))}function p(e,t,r){const n=Tt.join(f(),e,It.clean(t)||t,r||"");Ot.writeFileSync(n+".complete",""),St.debug("finished caching tool")}function d(e){const t=It.clean(e)||"";St.debug("isExplicit: "+t);const r=null!=It.valid(t);return St.debug("explicit? "+r),r}function h(e,t){let r="";St.debug(`evaluating ${e.length} versions`);for(let n=(e=e.sort(((e,t)=>It.gt(e,t)?1:-1))).length-1;n>=0;n--){const o=e[n];if(It.satisfies(o,t)){r=o;break}}return St.debug(r?"matched: "+r:"match not found"),r}function f(){const e=process.env.RUNNER_TOOL_CACHE||"";return Te.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function m(){const e=process.env.RUNNER_TEMP||"";return Te.ok(e,"Expected RUNNER_TEMP to be defined"),e}function v(e,t){const r=Ue[e];return void 0!==r?r:t}function g(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)=>{g(e,t||{},((e,t)=>{e?n(e):r(t)}))}))}Zt(e,t||{},((e,n)=>{e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}function y(e,r,n){if(!["darwin","linux"].includes(process.platform))return;if("string"==typeof nr)return{binDir:nr};const o=t(zt).sync("brew",{nothrow:!0});return null!==o?(nr=Ae.dirname(o),{binDir:nr}):(Ne.execFileSync('/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"',{stdio:"inherit"}),nr="/usr/local/bin/",{binDir:nr})}function x(e,t){const r=e.options.env||process.env,n=process.cwd(),o=null!=e.options.cwd,s=o&&void 0!==process.chdir&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch(e){}let i;try{i=zt.sync(e.command,{path:r[cr({env:r})],pathExt:t?Ae.delimiter:void 0})}catch(e){}finally{s&&process.chdir(n)}return i&&(i=Ae.resolve(o?e.options.cwd:"",i)),i}function w(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(e,t){return yr&&1===e&&!t.file?w(t.original,"spawn"):null}function b(e,t,r){const n=ar(e,t,r),o=Ne.spawn(n.command,n.args,n.options);return gr.hookChildProcess(o,n),o}function S(){Kr&&(Kr=!1,Wr.forEach((e=>{try{process.removeListener(e,zr[e])}catch(e){}})),process.emit=Zr,process.reallyExit=Jr,qr.count-=1)}function P(e,t,r){qr.emitted[e]||(qr.emitted[e]=!0,qr.emit(e,t,r))}function O(){Kr||(Kr=!0,qr.count+=1,Wr=Wr.filter((e=>{try{return process.on(e,zr[e]),!0}catch(e){return!1}})),process.emit=C,process.reallyExit=_)}function _(e){process.exitCode=e||0,P("exit",process.exitCode,null),P("afterexit",process.exitCode,null),Jr.call(process,process.exitCode)}function C(e,t){if("exit"===e){void 0!==t&&(process.exitCode=t);var r=Zr.apply(th
2021-09-18 04:00:26 +08:00
//# sourceMappingURL=setup_cpp.js.map