mirror of
https://github.com/shivammathur/setup-php.git
synced 2026-11-16 20:01:55 +00:00
Remove tool when its download fails and no previous version exists (#1155)
This commit is contained in:
@@ -279,8 +279,12 @@ add_tool() {
|
||||
sudo cp -a "$tool_path" "$cache_path"
|
||||
fi
|
||||
fi
|
||||
if [ "$status_code" != "200" ] && [ -f "$tool_path.bak" ]; then
|
||||
sudo mv "$tool_path.bak" "$tool_path"
|
||||
if [ "$status_code" != "200" ]; then
|
||||
if [ -f "$tool_path.bak" ]; then
|
||||
sudo mv "$tool_path.bak" "$tool_path"
|
||||
else
|
||||
sudo rm -f "$tool_path"
|
||||
fi
|
||||
fi
|
||||
sudo rm -f "$tool_path.bak"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user