mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-27 03:14:11 +00:00
feat(cli): discover Bash for Windows runners
Use Pi-style Bash discovery and launch behavior, exercise the packaged CLI shell, and wait for pending ZIP metadata reads before closing cancelled downloads.
This commit is contained in:
@@ -40,15 +40,15 @@ describe('createRunnerBashTool', () => {
|
||||
|
||||
const createMockOnUpdate = () => vi.fn()
|
||||
|
||||
it('tells the agent to use the runner OS and shell syntax', () => {
|
||||
const tool = createRunnerBashTool(
|
||||
{},
|
||||
{ environment: { platform: 'win32', shell: 'C:\\Windows\\System32\\cmd.exe' } },
|
||||
)
|
||||
expect(tool.description).toContain('Runner OS: win32')
|
||||
expect(tool.description).toContain('cmd.exe')
|
||||
expect(tool.description).toContain('Use syntax and programs compatible with this environment')
|
||||
})
|
||||
it.each(['C:\\Windows\\System32\\cmd.exe', 'C:\\Program Files\\Git\\bin\\bash.exe'])(
|
||||
'tells the agent to use the runner OS and shell syntax for %s',
|
||||
(shell) => {
|
||||
const tool = createRunnerBashTool({}, { environment: { platform: 'win32', shell } })
|
||||
expect(tool.description).toContain('Runner OS: win32')
|
||||
expect(tool.description).toContain(shell)
|
||||
expect(tool.description).toContain('Use syntax and programs compatible with this environment')
|
||||
},
|
||||
)
|
||||
|
||||
it('should execute a command on the runner with injected env vars', async () => {
|
||||
const tool = createRunnerBashTool(
|
||||
|
||||
Reference in New Issue
Block a user