@clazic/urban 0.2.12 → 0.2.13

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clazic/urban",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "description": "도시계획연구 보고서 자동 수집·지식베이스 데몬",
5
5
  "type": "module",
6
6
  "engines": {
@@ -312,8 +312,13 @@ export async function statusDaemon() {
312
312
  }
313
313
  } else if (isWindows) {
314
314
  try {
315
- const result = execSync(`powershell -NoProfile -Command "Get-ScheduledTask -TaskName 'Urban' | Select-Object -ExpandProperty State"`, { encoding: 'utf8', shell: true, stdio: 'pipe' });
315
+ // -ErrorAction SilentlyContinue: 미등록 문자열 반환 (throw 없음)
316
+ const result = execSync(
317
+ `powershell -NoProfile -Command "(Get-ScheduledTask -TaskName 'Urban' -ErrorAction SilentlyContinue)?.State"`,
318
+ { encoding: 'utf8', shell: true, stdio: 'pipe' }
319
+ );
316
320
  const state = result.trim();
321
+ if (!state) return { running: false, message: '데몬 미등록' };
317
322
  const running = state === 'Running';
318
323
  return { running, message: `상태: ${state}` };
319
324
  } catch {