/** * `/bin/wget` parity entry: booter delegates to `wget-cli.js` when allowed. * Fallback uses `ctx.bareOsRunWgetCli` for the same Fetch-based implementation. */ async function run(ctx, argv) { for (let i = 1; i < argv.length; i++) { if (argv[i] === '--version' || argv[i] === '-V') { ctx.console.log('wget (Bare OS fetch subset) 0.1 — not GNU wget2') return } } if (typeof ctx.bareOsRunWgetCli === 'function') { await ctx.bareOsRunWgetCli(argv) return } ctx.console.error( 'wget: unavailable in this session (stock booter exposes ctx.bareOsRunWgetCli; upgrade bare-os-booter or run with a current ctx API)' ) ctx.exitCode = 127 }