setup-cpp/dist/setup_cpp.js

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