chore(dogfood): Avoid calling ~/personalize unless executable (#5793)

This commit is contained in:
Mathias Fredriksson
2023-01-19 19:02:15 +00:00
committed by GitHub
parent 2ed70c7af9
commit f0df0686f9
+6 -3
View File
@@ -68,11 +68,14 @@ resource "coder_agent" "dev" {
code-server --auth none --port 13337 &
sudo service docker start
DOTFILES_URI=${var.dotfiles_uri}
rm -f ~/.personalize.log
if [ -n "$DOTFILES_URI" ]; then
coder dotfiles "$DOTFILES_URI" -y 2>&1 | tee ~/.personalize.log
coder dotfiles "$DOTFILES_URI" -y 2>&1 | tee -a ~/.personalize.log
fi
if [ -f ./personalize ]; then
./personalize
if [ -x ~/personalize ]; then
~/personalize | tee -a ~/.personalize.log
elif [ -f ~/personalize ]; then
echo "~/personalize is not executable, skipping..." | tee -a ~/.personalize.log
fi
EOF
}