Skip to content

Commit 1748f24

Browse files
committed
Refactor source path
1 parent 070d53d commit 1748f24

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

bin/install

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ install_deno() {
5353
local archive_format
5454
local uncompress_command
5555
local archive_file
56-
local source_path
5756

5857
if [ "$install_type" == "version" ]; then
5958
if [[ $version > "0.35.0" ]]; then
@@ -90,19 +89,17 @@ install_deno() {
9089
fi
9190

9291
local download_url="https://github.com/denoland/deno/releases/download/v${version}/${archive_file}"
93-
source_path="${install_path}/bin/deno.${archive_format}"
92+
local source_path="${install_path}/bin/deno.${archive_format}"
9493
echo "* Downloading and installing deno..."
9594
install_from_archive "$source_path" "$download_url" "$uncompress_command"
95+
rm "$source_path"
9696
else
9797
echo "* Building and installing deno..."
9898
install_from_source "$install_path" "$version"
9999
fi
100100

101101
chmod +x "${install_path}/bin/deno"
102102
mkdir "${install_path}/.deno"
103-
if [ -f "$source_path" ]; then
104-
rm "$source_path"
105-
fi
106103
echo "The installation was successful!"
107104
}
108105

0 commit comments

Comments
 (0)