diff --git a/Vagrantfile b/Vagrantfile index d9b12d12..9fc94462 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -323,7 +323,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 6a327eae..63638916 100644 --- a/scripts/composer.sh +++ b/scripts/composer.sh @@ -52,8 +52,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