diff --git a/Vagrantfile b/Vagrantfile index 5b34ccfe..532f4b4d 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -320,7 +320,7 @@ Vagrant.configure("2") do |config| # Provision Composer # You may pass a github auth token as the first argument - # config.vm.provision "shell", path: "#{github_url}/scripts/composer.sh", privileged: false, args: ["", composer_packages.join(" ")] + # config.vm.provision "shell", path: "#{github_url}/scripts/composer.sh", privileged: false, args: [github_pat, composer_packages.join(" ")] # Provision Laravel # config.vm.provision "shell", path: "#{github_url}/scripts/laravel.sh", privileged: false, args: [server_ip, laravel_root_folder, public_folder, laravel_version] diff --git a/scripts/composer.sh b/scripts/composer.sh index 28b6d83c..8f8054ee 100644 --- a/scripts/composer.sh +++ b/scripts/composer.sh @@ -54,8 +54,9 @@ else fi fi -if [[ $GITHUB_OAUTH -ne "" ]]; then +if [[ $GITHUB_OAUTH != "" ]]; then if [[ ! $COMPOSER_IS_INSTALLED -eq 1 ]]; then + echo ">>> Setting Github Personal Access Token" composer config -g github-oauth.github.com $GITHUB_OAUTH fi fi