style: apply prettier to the repo's declared format surface

This commit is contained in:
chick
2026-09-07 01:59:24 +08:00
parent 2977f75129
commit 29a0eee854
11 changed files with 30 additions and 23 deletions
@@ -499,7 +499,10 @@ describe('createSystemdRestartLauncher', () => {
it('supports the system scope and surfaces systemctl failures', async () => {
const calls: string[][] = [];
const launcher = createSystemdRestartLauncher({
env: { MULTI_SIMADMIN_SYSTEMD_UNIT: 'multi-simadmin-api.service', MULTI_SIMADMIN_SYSTEMD_SCOPE: 'system' },
env: {
MULTI_SIMADMIN_SYSTEMD_UNIT: 'multi-simadmin-api.service',
MULTI_SIMADMIN_SYSTEMD_SCOPE: 'system',
},
runner: {
run: async (command, args) => {
calls.push([command, ...args]);
@@ -258,7 +258,11 @@ export function createSystemdRestartLauncher(input: {
supported,
async restart() {
if (!supported)
throw new UpdateError('NOT_SUPPORTED', '未配置 systemd 服务单元(MULTI_SIMADMIN_SYSTEMD_UNIT)。', 501);
throw new UpdateError(
'NOT_SUPPORTED',
'未配置 systemd 服务单元(MULTI_SIMADMIN_SYSTEMD_UNIT)。',
501,
);
const result = await input.runner.run('systemctl', [scope, 'restart', unit]);
if (result.code !== 0)
throw new UpdateError(