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

This commit is contained in:
Mathias Fredriksson 2023-01-19 21:02:15 +02:00 committed by GitHub
parent 2ed70c7af9
commit f0df0686f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

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
}