Files
wehub-resource-sync 8cb1f9f479
Publish SDK (PyPI) / publish (push) Waiting to run
Publish SDK (npm) / publish (@aionui/officecli-sdk) (push) Waiting to run
Publish SDK (npm) / publish (@officecli/officecli-sdk) (push) Waiting to run
Publish SDK (npm) / publish (@officecli/sdk) (push) Waiting to run
Publish SDK (npm) / publish (officecli-sdk) (push) Waiting to run
SDK smoke / smoke (windows-latest) (push) Waiting to run
SDK smoke / smoke (macos-latest) (push) Waiting to run
SDK smoke / smoke (ubuntu-latest) (push) Waiting to run
Skill parity / diff (push) Waiting to run
chore: import upstream snapshot with attribution
2026-07-13 13:09:29 +08:00

22 lines
919 B
JavaScript

'use strict';
// postinstall entry point. Downloads the platform binary up-front so the first
// `officecli` call is instant. A failure here is non-fatal: the bin shim
// (bin/officecli.js) lazily downloads on first run, so an offline/proxied
// install still leaves a working command once connectivity returns. Set
// OFFICECLI_SKIP_BINARY_DOWNLOAD=1 to skip the download entirely.
if (process.env.OFFICECLI_SKIP_BINARY_DOWNLOAD) {
process.stderr.write('[officecli] OFFICECLI_SKIP_BINARY_DOWNLOAD set, skipping binary download.\n');
process.exit(0);
}
require('./lib/install-binary')
.ensureBinary()
.catch(function (err) {
process.stderr.write('[officecli] postinstall could not fetch the binary: ' + err.message + '\n');
process.stderr.write('[officecli] it will be downloaded on first run instead.\n');
// Exit 0 so `npm install` succeeds; the shim retries lazily.
process.exit(0);
});