Skip to content

Commit

Permalink
fix(lint): tools.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <troian.ap@gmail.com>
  • Loading branch information
troian committed Sep 20, 2024
1 parent c1db4b2 commit 1bee230
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function replace_import_path() {
local curr_version
local new_module_name

curr_module_name=$(cd go; go list -m)
curr_module_name=$(cd go || exit; go list -m)
curr_version=$(echo "$curr_module_name" | sed -n 's/.*v\([0-9]*\).*/\1/p')
new_module_name=${curr_module_name%/"v$curr_version"}/$next_major_version

Expand Down Expand Up @@ -98,7 +98,7 @@ function replace_import_path() {
done

echo "updating go.mod"
for retract in $(cd go; go mod edit --json | jq -cr '.Retract | if . != null then .[] else empty end'); do
for retract in $(cd go || exit; go mod edit --json | jq -cr '.Retract | if . != null then .[] else empty end'); do
local low
local high

Expand Down

0 comments on commit 1bee230

Please sign in to comment.