async function e(e,t){if(e.length>0&&e[0]!==`-`){let n=t.fs.resolvePath(t.cwd,e[0]);try{let e=(await t.fs.readFile(n)).split(`
`);e[e.length-1]===``&&e.pop();let r=e.reverse();return{stdout:r.length>0?`${r.join(`
`)}
`:``,stderr:``,exitCode:0}}catch{return{stdout:``,stderr:`tac: ${e[0]}: No such file or directory
`,exitCode:1}}}let n=t.stdin.split(`
`);n[n.length-1]===``&&n.pop();let r=n.reverse();return{stdout:r.length>0?`${r.join(`
`)}
`:``,stderr:``,exitCode:0}}var t={name:`tac`,execute:e},n={name:`tac`,flags:[],stdinType:`text`,needsFiles:!0};export{t as n,n as t};
//# sourceMappingURL=chunk-MHTUABJP-Dk5ocjFo.mjs.map