@clazic/urban 0.2.16 → 0.2.17
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/cli.js +1 -1
- package/src/install/daemon.js +4 -3
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -64,7 +64,7 @@ async function run() {
|
|
|
64
64
|
console.log(`✅ ${installResult.message}`);
|
|
65
65
|
}
|
|
66
66
|
const result = await startDaemon();
|
|
67
|
-
console.log(result.ok ? `✅ ${result.message}` : `❌
|
|
67
|
+
console.log(result.ok ? `✅ ${result.message}` : `❌ ${result.message}`);
|
|
68
68
|
break;
|
|
69
69
|
}
|
|
70
70
|
case 'stop': {
|
package/src/install/daemon.js
CHANGED
|
@@ -348,10 +348,11 @@ export async function statusDaemon() {
|
|
|
348
348
|
}
|
|
349
349
|
} else if (isWindows) {
|
|
350
350
|
try {
|
|
351
|
-
//
|
|
351
|
+
// ?. 연산자는 PS 7+ 전용 — PS 5.1(Windows 기본)에서 파싱 오류 발생
|
|
352
|
+
// if 분기로 대체: 미등록 시 빈 문자열 출력
|
|
352
353
|
const result = execSync(
|
|
353
|
-
`powershell -NoProfile -Command "
|
|
354
|
-
{ encoding: 'utf8', shell: true, stdio: 'pipe' }
|
|
354
|
+
`powershell -NoProfile -Command "$t = Get-ScheduledTask -TaskName 'Urban' -ErrorAction SilentlyContinue; if ($t) { $t.State } else { '' }"`,
|
|
355
|
+
{ encoding: 'utf8', shell: true, stdio: ['ignore', 'pipe', 'pipe'] }
|
|
355
356
|
);
|
|
356
357
|
const state = result.trim();
|
|
357
358
|
if (!state) return { running: false, message: '데몬 미등록' };
|