Make sure global composer.json directory exists

This commit is contained in:
Shivam Mathur 2021-04-19 00:38:14 +05:30
parent c470f034d0
commit 8f96f50dcd
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -171,6 +171,7 @@ configure_composer() {
exit 1;
fi
if ! [ -e "$composer_json" ]; then
sudo mkdir -p "$(dirname "$composer_json")"
echo '{}' | tee "$composer_json" >/dev/null 2>&1
sudo chmod 644 "$composer_json"
fi