curl --version in packages/bare-os-coreutils/src/curl.js wget --version in packages/bare-os-coreutils/src/wget.js openssl version and openssl --version in packages/bare-os-coreutils/src/openssl.js nano --version (via edit) in packages/bare-os-coreutils/src/edit.js Updated tar compatibility in packages/bare-os-booter/lib/tar-cli.js: Added tar --version Added grouped short-flag parsing (-czf, etc.) Added first-arg legacy cluster parsing (czf) Added - archive target support for create/list/extract stream paths Kept implementation as ustar subset (accepts z for compatibility parsing) Fixed pipeline/timeout behavior: Optimized head line mode to stop scanning early (no full split) in packages/bare-os-coreutils/src/head.js Added bounded safety for yes cap in packages/bare-os-coreutils/src/yes.js Hardened timeout so timed-out commands reliably produce exit code 124 in packages/bare-os-coreutils/src/timeout.js Added scoped expr compatibility in shell: Prevented pathname expansion of bare * only for expr arithmetic-token case in packages/bare-os-booter/lib/shell.js Added glob option plumbing in packages/bare-os-booter/lib/shell-glob.js
21 lines
683 B
JavaScript
21 lines
683 B
JavaScript
/**
|
|
* `/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
|
|
}
|