Skip to content

Commit 7cec3d8

Browse files
committed
quotation fix
1 parent 1c02a76 commit 7cec3d8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

autoload/bazel.vim

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def S__label(): string
9797
endif
9898

9999
var path = expand('%:p')->S__rel_path(g:bazel.info.workspace)
100-
var output = systemlist($'cd {g:bazel.info.workspace}; set -o pipefail; bazel query {path} --output label {s_extra_args}')
100+
var output = systemlist($'cd "{g:bazel.info.workspace}"; bazel query ''"{path}"'' --output label {s_extra_args}')
101101

102102
if v:shell_error != 0 || empty(output)
103103
S__abort(output)
@@ -123,7 +123,7 @@ def S__jump_to_label(label__a: string)
123123

124124
var path = label__a->substitute(':__subpackages__', '/...', '')
125125
echo 'Fetching...'
126-
var output = systemlist($'cd {g:bazel.info.workspace}; set -o pipefail; bazel query {path} --output location {s_extra_args}')
126+
var output = systemlist($'cd "{g:bazel.info.workspace}"; bazel query ''"{path}"'' --output location {s_extra_args}')
127127
echo '' | redraw
128128

129129
if v:shell_error != 0 || empty(output)
@@ -202,7 +202,7 @@ def S__configure()
202202
g:bazel.status = s_PENDING
203203

204204
echo 'Configuring bazel...'
205-
var output = systemlist($'set -o pipefail; bazel info {s_extra_args}')
205+
var output = systemlist($'bazel info {s_extra_args}')
206206
echo '' | redraw
207207
if v:shell_error != 0
208208
g:bazel.status = s_FAILED
@@ -242,7 +242,7 @@ def S__goto_build()
242242
else
243243
S__configure()
244244
var path = expand('%:p')->S__rel_path(g:bazel.info.workspace)
245-
var output = systemlist($'cd {g:bazel.info.workspace}; set -o pipefail; bazel query {path} --output location --noincompatible_display_source_file_location {s_extra_args}')
245+
var output = systemlist($'cd "{g:bazel.info.workspace}"; bazel query ''"{path}"'' --output location --noincompatible_display_source_file_location {s_extra_args}')
246246

247247
if v:shell_error != 0 || empty(output)
248248
S__abort(output)
@@ -284,7 +284,7 @@ def S__show_references(label__a = '')
284284
endif
285285

286286
echo 'Fetching...'
287-
var output = systemlist($'cd {g:bazel.info.workspace}; set -o pipefail; bazel query "rdeps(//..., {label})" --output location {s_extra_args}')
287+
var output = systemlist($'cd "{g:bazel.info.workspace}"; bazel query ''rdeps(//..., "{label}")'' --output location {s_extra_args}')
288288
echo '' | redraw
289289
cgetexpr output
290290
copen
@@ -317,7 +317,7 @@ export def CompleteList(arg_lead__a: string, cmd_line__a: string, cursor_pos__a:
317317
target = '...'
318318
endif
319319

320-
var targets = systemlist($'cd {g:bazel.info.workspace}; set -o pipefail; bazel query {target} {s_extra_args}')
320+
var targets = systemlist($'cd "{g:bazel.info.workspace}"; bazel query ''"{target}"'' {s_extra_args}')
321321
if v:shell_error != 0
322322
echoerr 'Bazel query error: ' .. v:shell_error
323323
return []

0 commit comments

Comments
 (0)