Skip to content

Commit 4dcead2

Browse files
committed
fix: correct variable substitution in Makefile for framework installation
1 parent c321515 commit 4dcead2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,18 +260,18 @@ reset-owner:
260260

261261
install-symfony:
262262
@echo "${BLUE}Installing Symfony framework...${NC}"
263-
@$(DOCKER_EXEC) $(PHP_CONTAINER) composer create-project symfony/skeleton ./${SYMFONY_DIR:-symfony-app}
264-
@echo "${GREEN}Symfony installed in ./${SYMFONY_DIR:-symfony-app}!${NC}"
263+
@$(DOCKER_EXEC) $(PHP_CONTAINER) bash -c "cd /var/www/html && composer create-project symfony/skeleton $(if $(SYMFONY_DIR),$(SYMFONY_DIR),symfony-app)"
264+
@echo "${GREEN}Symfony installed in ./web/$(if $(SYMFONY_DIR),$(SYMFONY_DIR),symfony-app)!${NC}"
265265
@echo "${YELLOW}To configure Nginx for Symfony, please update your .env file with:${NC}"
266266
@echo "${YELLOW}APP_FRAMEWORK=symfony${NC}"
267-
@echo "${YELLOW}APP_PUBLIC_DIR=${SYMFONY_DIR:-symfony-app}/public${NC}"
267+
@echo "${YELLOW}APP_PUBLIC_DIR=$(if $(SYMFONY_DIR),$(SYMFONY_DIR),symfony-app)/public${NC}"
268268
@echo "${YELLOW}Then restart the containers with: make restart${NC}"
269269

270270
install-laravel:
271271
@echo "${BLUE}Installing Laravel framework...${NC}"
272-
@$(DOCKER_EXEC) $(PHP_CONTAINER) composer create-project laravel/laravel ./${LARAVEL_DIR:-laravel-app}
273-
@echo "${GREEN}Laravel installed in ./${LARAVEL_DIR:-laravel-app}!${NC}"
272+
@$(DOCKER_EXEC) $(PHP_CONTAINER) bash -c "cd /var/www/html && composer create-project laravel/laravel $(if $(LARAVEL_DIR),$(LARAVEL_DIR),laravel-app)"
273+
@echo "${GREEN}Laravel installed in ./web/$(if $(LARAVEL_DIR),$(LARAVEL_DIR),laravel-app)!${NC}"
274274
@echo "${YELLOW}To configure Nginx for Laravel, please update your .env file with:${NC}"
275275
@echo "${YELLOW}APP_FRAMEWORK=laravel${NC}"
276-
@echo "${YELLOW}APP_PUBLIC_DIR=${LARAVEL_DIR:-laravel-app}/public${NC}"
276+
@echo "${YELLOW}APP_PUBLIC_DIR=$(if $(LARAVEL_DIR),$(LARAVEL_DIR),laravel-app)/public${NC}"
277277
@echo "${YELLOW}Then restart the containers with: make restart${NC}"

0 commit comments

Comments
 (0)