Skip to content

Commit 7cf6999

Browse files
committed
feat: switch to posix version
1 parent 33735e4 commit 7cf6999

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/executeBash.test.ts

-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ import { strict as assert } from 'assert'
22
import * as mockfs from 'mock-fs'
33
import * as sinon from 'sinon'
44
import { ExecuteBash } from './executeBash'
5-
import { processUtils } from '@aws/lsp-core'
65
import { Logging } from '@aws/language-server-runtimes/server-interface'
76
import { TestFeatures } from '@aws/language-server-runtimes/testing'
8-
import { Writable } from 'stream'
97

108
describe('ExecuteBash Tool', () => {
119
let logging: Logging

server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/executeBash.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ export class ExecuteBash {
305305
}
306306

307307
private static async whichCommand(logger: Logging, cmd: string): Promise<string> {
308-
const cp = new processUtils.ChildProcess(logger, 'which', [cmd], {
308+
// use 'command -v' instead as which isn't POSIX
309+
const cp = new processUtils.ChildProcess(logger, 'command', ['-v', cmd], {
309310
collect: true,
310311
waitForStreams: true,
311312
})

0 commit comments

Comments
 (0)