@@ -42,10 +42,6 @@ extension CommandRunner {
4242 try run ( baseConfig. bazelWrapper + " " + cmd, cwd: rootUri)
4343 }
4444
45- func bazel( baseConfig: BaseServerConfig , rootUri: String , cmd: String ) throws -> Data {
46- try run ( baseConfig. bazelWrapper + " " + cmd, cwd: rootUri)
47- }
48-
4945 /// A regular bazel command, but at this BSP's special output base and taking into account the special index flags.
5046 func bazelIndexAction( initializedConfig: InitializedServerConfig , cmd: String ) throws -> String {
5147 return try bazelIndexAction (
@@ -56,14 +52,16 @@ extension CommandRunner {
5652 )
5753 }
5854
59- /// A regular bazel command, but at this BSP's special output base and taking into account the special index flags.
60- func bazelIndexActionData( initializedConfig: InitializedServerConfig , cmd: String ) throws -> Data {
61- let additionalFlags = initializedConfig. baseConfig. indexFlags. joined ( separator: " " )
62- let baseConfig = initializedConfig. baseConfig
63- let outputBase = initializedConfig. outputBase
64- let rootUri = initializedConfig. rootUri
65- let cmd = " --output_base= \( outputBase) \( cmd) \( additionalFlags) "
66- return try bazel ( baseConfig: baseConfig, rootUri: rootUri, cmd: cmd)
55+ /// A bazel action query command, but at this BSP's special output base and taking into account the special index flags.
56+ func bazelActionQuery( initializedConfig: InitializedServerConfig , cmd: String ) throws -> Data {
57+ let baseCommand = [
58+ initializedConfig. baseConfig. bazelWrapper,
59+ " --output_base= \( initializedConfig. outputBase) " ,
60+ cmd,
61+ ]
62+ let additionalFlags = initializedConfig. baseConfig. indexFlags
63+ let command = ( baseCommand + additionalFlags) . joined ( separator: " " )
64+ return try run ( command, cwd: initializedConfig. rootUri)
6765 }
6866
6967 /// A regular bazel command, but at this BSP's special output base and taking into account the special index flags.
0 commit comments