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