Run daemon on packaged Bare runtime
Rolling release / release (push) Canceled after 14m9s
CI / verify (push) Canceled after 14m18s

This commit is contained in:
2026-09-11 15:52:53 -04:00
parent 562f1a6316
commit a3314db1e9
30 changed files with 2953 additions and 65 deletions
+9 -3
View File
@@ -1,9 +1,15 @@
import { access } from 'node:fs/promises';
import { constants } from 'node:fs';
import { execFile } from 'node:child_process';
import { promisify } from 'node:util';
import { spawn } from 'node:child_process';
const run = promisify(execFile);
const run = (file, args) => new Promise((resolve, reject) => {
const child = spawn(file, args, { stdio: ['ignore', 'pipe', 'pipe'] });
let stdout = ''; let stderr = '';
child.stdout?.on('data', (chunk) => { stdout += chunk; });
child.stderr?.on('data', (chunk) => { stderr += chunk; });
child.once('error', reject);
child.once('close', (code) => code === 0 ? resolve({ stdout, stderr }) : reject(new Error(stderr || `${file} exited ${code}`)));
});
const checks = [
['session', false, async () => process.env.XDG_SESSION_TYPE || 'unknown'],
['portal', false, async () => { await access('/usr/share/dbus-1/services/org.freedesktop.portal.Desktop.service', constants.F_OK); return 'installed'; }],