style: apply prettier to the repo's declared format surface
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user