Skip to content

Commit dc81f85

Browse files
committed
chore: install the kat tool in a dedicated home directory instead of using $PWD
1 parent a952cd3 commit dc81f85

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/actions/setup-kat/action.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,22 @@ runs:
1818
echo "No versions of kat were found"
1919
exit 1
2020
fi
21-
echo "Downloading kat version $kat_version to $PWD"
22-
21+
22+
kat_dir="$HOME/kat"
23+
24+
echo "Creating directory for kat tool at $kat_dir"
25+
mkdir -p "$kat_dir"
26+
pushd "$kat_dir"
27+
28+
echo "Downloading kat version $kat_version to $kat_dir"
2329
aws s3 cp s3://kotlin-sdk-build-tools/kat-releases/$kat_version/kat-$kat_version.zip ./kat.zip --no-progress
2430
2531
echo "Unzipping kat tool"
26-
unzip -qq ./kat.zip -d kat
32+
unzip -qq ./kat.zip
2733
28-
kat_binary_path="$PWD/kat/kat-$kat_version/bin"
34+
kat_binary_path="$kat_dir/kat-$kat_version/bin"
2935
echo "Appending \"$kat_binary_path\" to path"
3036
export PATH="$kat_binary_path:$PATH"
3137
echo "$kat_binary_path" >> $GITHUB_PATH
3238
33-
echo "Installed kat version $(kat version)" || (echo "Failed to execute kat command" && exit 1)
39+
echo "Installed kat version $(kat version)" || (echo "Failed to execute kat command" && exit 1)

0 commit comments

Comments
 (0)