@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 +1 -1
- package/src/install/daemon.js +6 -1
package/package.json
CHANGED
package/src/install/daemon.js
CHANGED
|
@@ -312,8 +312,13 @@ export async function statusDaemon() {
|
|
|
312
312
|
}
|
|
313
313
|
} else if (isWindows) {
|
|
314
314
|
try {
|
|
315
|
-
|
|
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 {
|