Check for VS Code before setting theme

This commit is contained in:
Justin Horner
2024-09-30 11:17:31 -04:00
parent 30597f3aac
commit 7a2e29172e

View File

@@ -1,2 +1,4 @@
code --install-extension $VSC_EXTENSION >/dev/null
sed -i "s/\"workbench.colorTheme\": \".*\"/\"workbench.colorTheme\": \"$VSC_THEME\"/g" ~/.config/Code/User/settings.json
if command -v code &>/dev/null; then
code --install-extension $VSC_EXTENSION >/dev/null
sed -i "s/\"workbench.colorTheme\": \".*\"/\"workbench.colorTheme\": \"$VSC_THEME\"/g" ~/.config/Code/User/settings.json
fi