mirror of
https://github.com/shivammathur/setup-php.git
synced 2026-11-26 21:42:06 +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"
|
sudo cp -a "$tool_path" "$cache_path"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "$status_code" != "200" ] && [ -f "$tool_path.bak" ]; then
|
if [ "$status_code" != "200" ]; then
|
||||||
sudo mv "$tool_path.bak" "$tool_path"
|
if [ -f "$tool_path.bak" ]; then
|
||||||
|
sudo mv "$tool_path.bak" "$tool_path"
|
||||||
|
else
|
||||||
|
sudo rm -f "$tool_path"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
sudo rm -f "$tool_path.bak"
|
sudo rm -f "$tool_path.bak"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user