Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script @auto-scripts was called via post-install-cmd #99

Open
infografik opened this issue Sep 19, 2019 · 8 comments
Open

Script @auto-scripts was called via post-install-cmd #99

infografik opened this issue Sep 19, 2019 · 8 comments

Comments

@infografik
Copy link

infografik commented Sep 19, 2019

Code

$ ./bin/console deploy -v
[...]
Copying the updated code to the new release directory
[user@domain] Executing command: (export APP_ENV=prod; cd /dir/releases/20190919133916 && cp -RPp /dir/repo/* /dir/releases/20190919133916)
----- START -----
Here is mistake: cp -RPp /dir/repo/* /dir/releases/20190919133916)
The * character does not copy files starting with a dot. Please add:
&& cp -R /dir/repo/.e* /dir/releases/20190919133916) && cp -R /dir/repo/.g* /dir/releases/20190919133916)
Only .* cannot be added due to the presence of '..' in the folder.
----- STOP -----
[...]
Installing Composer dependencies
[user@domain] Executing command: (export APP_ENV=prod; cd /dir/releases/20190919133916 && /usr/local/bin/composer install --no-dev --prefer-dist --no-interaction --quiet)
| err :: Script @auto-scripts was called via post-install-cmd
[ERROR] Cancelling the deployment and reverting the changes
[...]
In Process.php line 256:
[Symfony\Component\Process\Exception\ProcessFailedException] The command "ssh -A user@domain '(export APP_ENV=prod; cd /dir/releases/20190919133916 && /usr/local/bin/composer install --no-dev --prefer-dist --no-interaction --quiet)'" failed.
Exit Code: 255(Unknown error)
[...]
Error Output:
================
Script @auto-scripts was called via post-install-cmd
[...]

Error reason

In /dir/releases/201909133916:
assets composer.json config package.json public symfony.lock tests var webpack.config.js bin composer.lock package-lock.json phpunit.xml.dist src templates translations vendor yarn.lock

There are no files starting with a dot (files are present in /dir/releases/20190919133916):
.env .env-test .git .gitignore

@felixprojekt
Copy link

Same issue here

@lcavero
Copy link

lcavero commented Nov 1, 2019

please fix it!

@alzedd
Copy link

alzedd commented May 24, 2020

Any News?

@lcavero
Copy link

lcavero commented May 25, 2020

I solve it adding this lines in deploy.php

public function beforePreparing() { $this->runRemote('cp {{ deploy_dir }}/repo/.env {{ project_dir }}/.env'); $this->runRemote('cp {{ deploy_dir }}/repo/.env.development {{ project_dir }}/.env.development'); }

@alzedd
Copy link

alzedd commented May 25, 2020

while I was waiting for a fix to this issue I put my .env file in the shared folder, which I think it's the best thing to do in order to hide sensitive data such as database coordinates and so on

@fd6130
Copy link

fd6130 commented Nov 15, 2021

while I was waiting for a fix to this issue I put my .env file in the shared folder, which I think it's the best thing to do in order to hide sensitive data such as database coordinates and so on

But if the .env is a breaking change, rolling back will become another issue i think.

@ciscolybon
Copy link

salut

@adeltby
Copy link

adeltby commented Mar 10, 2023

you should make the .env file and set APP_ENV=prod after that run

composer dump-env prod

then run :

composer install --no-dev --optimize-autoloader

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants