mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-23 15:32:22 +00:00
d15b54cf40
* Add missing fast-boot `stop()` call on CLI exit to avoid 1s timeout. * Move `.fast-boot.json` to `~/.balena/cli-module-cache.json` to address scenarios where the CLI is installed to a read-only folder: - pkg's internal 'snapshot' filesystem (standalone zip package) - Root-owned folder without write permission to regular users, like `/usr[/local]/lib/balena-cli` (the case of caxa-based installers or the GUI installer for macOS). Change-type: patch
24 lines
592 B
JavaScript
Executable File
24 lines
592 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
// tslint:disable:no-var-requires
|
|
|
|
// We boost the threadpool size as ext2fs can deadlock with some
|
|
// operations otherwise, if the pool runs out.
|
|
process.env.UV_THREADPOOL_SIZE = '64';
|
|
|
|
// Disable oclif registering ts-node
|
|
process.env.OCLIF_TS_NODE = 0;
|
|
|
|
async function run() {
|
|
// Use fast-boot to cache require lookups, speeding up startup
|
|
await require('../build/fast-boot').start();
|
|
|
|
// Set the desired es version for downstream modules that support it
|
|
require('@balena/es-version').set('es2018');
|
|
|
|
// Run the CLI
|
|
await require('../build/app').run();
|
|
}
|
|
|
|
run();
|