@aglit-ai/cli 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/updates.cjs +7 -2
package/package.json
CHANGED
package/src/updates.cjs
CHANGED
|
@@ -228,7 +228,12 @@ function validateInstalledGraph(directory, manifests) {
|
|
|
228
228
|
}
|
|
229
229
|
return true;
|
|
230
230
|
}
|
|
231
|
-
async function bootstrap(channel) {
|
|
231
|
+
async function bootstrap(channel) {
|
|
232
|
+
const selected = channel || state().channel;
|
|
233
|
+
need(channels.includes(selected), 'Invalid update channel');
|
|
234
|
+
const offered = await offers(selected);
|
|
235
|
+
return {...await stage(offered.cli, fs.realpathSync(os.tmpdir()), offered.runtime), channel: selected};
|
|
236
|
+
}
|
|
232
237
|
function adoptBootstrap(value) {
|
|
233
238
|
const parent = path.join(installation.root, 'cli'); fs.mkdirSync(parent, {recursive: true, mode: 0o700});
|
|
234
239
|
const target = path.join(parent, value.cli.version + '-' + crypto.randomUUID());
|
|
@@ -267,7 +272,7 @@ function runtimeStopped(installed) {
|
|
|
267
272
|
const output = execFileSync('/bin/ps', ['-axo', 'pid=,uid=,comm='], {encoding: 'utf8', timeout: 15000, maxBuffer: 8 * 1024 ** 2});
|
|
268
273
|
const lines = output.trim().split('\n'); need(lines.length > 1, 'Native process inventory unavailable');
|
|
269
274
|
return !lines.some(line => {
|
|
270
|
-
const found = /^\s*(\d+)\s+(
|
|
275
|
+
const found = /^\s*(\d+)\s+(-?\d+)\s+(.+)$/.exec(line); need(found, 'Native process inventory is incomplete');
|
|
271
276
|
return found[3].trim() === installed.executable;
|
|
272
277
|
});
|
|
273
278
|
}
|