15 lines
378 B
Plaintext
15 lines
378 B
Plaintext
/** Shared helpers for drive-resident /bin scripts (prepended before each command). */
|
|
function bareStdin(ctx) {
|
|
return typeof ctx.shellStdin === 'string' ? ctx.shellStdin : ''
|
|
}
|
|
|
|
async function run(ctx, argv) {
|
|
const tty = globalThis.process?.stdout?.isTTY
|
|
if (tty) {
|
|
ctx.console.log('/dev/tty')
|
|
} else {
|
|
ctx.console.log('not a tty')
|
|
ctx.exitCode = 1
|
|
}
|
|
}
|