Skip to content

Commit c37bed1

Browse files
committed
fix(pkg-get): localize variable "file" properly
The variable `i` is declared but unused in `_comp_cmd_pkg_get__catalog_file`. The variable `file` is declared but unused in `_comp_cmd_pkg_get`. Instead, the variable `file` is used inside `_comp_cmd_pkg_get__catalog_file`. The variable `file` should be declared inside `_comp_cmd_pkg_get__catalog_file` instead of the variable `i`.
1 parent 88bcdb1 commit c37bed1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

completions-core/pkg-get.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
_comp_cmd_pkg_get__catalog_file()
66
{
77
local url=$1
8-
local i conffile
8+
local file conffile
99

1010
for file in /etc/opt/csw/pkg-get.conf /opt/csw/etc/pkg-get.conf /etc/pkg-get.conf; do
1111
if [[ -f $file ]]; then
@@ -29,7 +29,7 @@ _comp_cmd_pkg_get()
2929
local cur prev words cword comp_args
3030
_comp_initialize -- "$@" || return
3131

32-
local file url command=""
32+
local url command=""
3333
if [[ $prev == "-s" ]]; then
3434
return 1
3535
fi

0 commit comments

Comments
 (0)