Skip to content

Commit

Permalink
do not invoke local in a loop
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthehenry committed Nov 28, 2021
1 parent 1270430 commit cd23ab2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sd
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,10 @@ sd() (
set -euo pipefail

local target=${SD_ROOT:-$HOME/sd}
local arg

while [[ $# -gt 0 ]]; do
local arg="$1"
arg="$1"
if [[ -d "$target/$arg" ]]; then
target="$target/$arg"
shift
Expand Down

0 comments on commit cd23ab2

Please sign in to comment.