File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { spawn } from 'node:child_process'
2+ import { platform } from 'node:os'
23import process from 'node:process'
34import * as core from '@actions/core'
45import waitOn from 'wait-on'
@@ -9,10 +10,10 @@ const BASE_URL = `http://${HOST}:${PORT}`
910
1011core . info ( '🚀 准备启动 Nitro 服务...' )
1112
12- // 启动服务(shell: true 保证 Windows 下能找到 pnpm.cmd)
13- const server = spawn ( 'pnpm dev' , {
13+ // Windows 下 pnpm 实际是 pnpm.cmd,需要指定完整文件名
14+ const pnpmCmd = platform ( ) === 'win32' ? 'pnpm.cmd' : 'pnpm'
15+ const server = spawn ( pnpmCmd , [ 'dev' ] , {
1416 stdio : 'inherit' ,
15- shell : true ,
1617 env : {
1718 ...process . env ,
1819 NITRO_PORT : String ( PORT ) ,
Original file line number Diff line number Diff line change @@ -49,10 +49,7 @@ const attendanceContext = createContext<AttendanceContext>({
4949// Export composable function for accessing context
5050const useAttendanceContext = attendanceContext . use
5151
52- // 是否启用终末地签到
53- const ENDFIELD_ENABLED = true
54-
55- const ATTENDANCE_AVAILABLE_APPCODE = [ 'arknights' , ...( ENDFIELD_ENABLED ? [ 'endfield' ] : [ ] ) ]
52+ const ATTENDANCE_AVAILABLE_APPCODE = [ 'arknights' , 'endfield' ]
5653
5754async function processAccount (
5855 token : string ,
You can’t perform that action at this time.
0 commit comments