setup-cpp/dist/setup_cpp.js

3 lines
154 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 ot(e,t,r);process.stdout.write(""+n+rt.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={}){Je.issueCommand("error",nt.toCommandProperties(t),e instanceof Error?""+e:e)}function s(e){Je.issue("group",e)}function i(){Je.issue("endgroup")}function a(e,t,r){return Gt(this,void 0,void 0,(function*(){const n=Ht.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 Ht.ToolRunner(o,t,r).exec()}))}function c(e,t){const r=[];t=t||It.arch();const n=Rt.join(f(),e);if(Ct.existsSync(n)){const e=Ct.readdirSync(n);for(const o of e)if(d(o)){const e=Rt.join(n,o,t||"");Ct.existsSync(e)&&Ct.existsSync(e+".complete")&&r.push(o)}}return r}function l(e){return Pt(this,void 0,void 0,(function*(){return e||(e=Rt.join(m(),kt.default())),yield $t.mkdirP(e),e}))}function u(e,t,r){return Pt(this,void 0,void 0,(function*(){const n=Rt.join(f(),e,Nt.clean(t)||t,r||"");_t.debug("destination "+n);const o=n+".complete";return yield $t.rmRF(n),yield $t.rmRF(o),yield $t.mkdirP(n),n}))}function p(e,t,r){const n=Rt.join(f(),e,Nt.clean(t)||t,r||"");Ct.writeFileSync(n+".complete",""),_t.debug("finished caching tool")}function d(e){const t=Nt.clean(e)||"";_t.debug("isExplicit: "+t);const r=null!=Nt.valid(t);return _t.debug("explicit? "+r),r}function h(e,t){let r="";_t.debug(`evaluating ${e.length} versions`);for(let n=(e=e.sort(((e,t)=>Nt.gt(e,t)?1:-1))).length-1;n>=0;n--){const o=e[n];if(Nt.satisfies(o,t)){r=o;break}}return _t.debug(r?"matched: "+r:"match not found"),r}function f(){const e=process.env.RUNNER_TOOL_CACHE||"";return Re.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function m(){const e=process.env.RUNNER_TEMP||"";return Re.ok(e,"Expected RUNNER_TEMP to be defined"),e}function v(e,t){const r=Ve[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)}))}))}tr(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 ir)return{binDir:ir};const o=t(Jt).sync("brew",{nothrow:!0});return null!==o?(ir=De.dirname(o),{binDir:ir}):(ke.execFileSync('/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"',{stdio:"inherit"}),ir="/usr/local/bin/",{binDir:ir})}function w(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=Jt.sync(e.command,{path:r[pr({env:r})],pathExt:t?De.delimiter:void 0})}catch(e){}finally{s&&process.chdir(n)}return i&&(i=De.resolve(o?e.options.cwd:"",i)),i}function x(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 Er&&1===e&&!t.file?x(t.original,"spawn"):null}function b(e,t,r){const n=ur(e,t,r),o=ke.spawn(n.command,n.args,n.options);return xr.hookChildProcess(o,n),o}function S(){Qr&&(Qr=!1,Yr.forEach((e=>{try{process.removeListener(e,Jr[e])}catch(e){}})),process.emit=tn,process.reallyExit=en,zr.count-=1)}function P(e,t,r){zr.emitted[e]||(zr.emitted[e]=!0,zr.emit(e,t,r))}function O(){Qr||(Qr=!0,zr.count+=1,Yr=Yr.filter((e=>{try{return process.on(e,Jr[e]),!0}catch(e){return!1}})),process.emit=$,process.reallyExit=_)}function _(e){process.exitCode=e||0,P("exit",process.exitCode,null),P("afterexit",process.exitCode,null),en.call(process,process.exitCode)}function $(e,t){if("exit"===e){void 0!==t&&(process.exitCode=t);var r=tn.apply(th
2021-09-18 04:00:26 +08:00
//# sourceMappingURL=setup_cpp.js.map