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 cp ./build/hooks/pre-commit ./.git/hooks/pre-commit handling the post-install-cmd event returned with error code 1 #3145

Closed
comunidademagento opened this issue Dec 27, 2016 · 17 comments
Labels

Comments

@comunidademagento
Copy link

@comunidademagento comunidademagento commented Dec 27, 2016

What type of report is this:

Q A
Bug report? Y
Feature request?
Enhancement?

Description:

After processed the command composer install

Present this message in terminal with color red.

Script cp ./build/hooks/pre-commit ./.git/hooks/pre-commit handling the post-install-cmd event returned with error code 1

If a bug:

Q A
Mautic version 2.4
PHP version 5.6

Steps to reproduce:

  1. composer install
  2. Script cp ./build/hooks/pre-commit ./.git/hooks/pre-commit handling the post-install-cmd event returned with error code 1

Image:

github

@royaldark

This comment has been minimized.

Copy link

@royaldark royaldark commented Dec 28, 2016

I am also experiencing this issue. I installed from a ZIP bundle, rather than by cloning the repo, so there is no .git folder.

@MarkLL

This comment has been minimized.

Copy link
Contributor

@MarkLL MarkLL commented Dec 29, 2016

Hi @comunidademagento, the error is because you are running Windows! And yep I had that too.

There is a quick fix for this although I had not thought about @royaldark's situation and will modify it and post a PR. Note: the install is OK.

@comunidademagento

This comment has been minimized.

Copy link
Author

@comunidademagento comunidademagento commented Dec 29, 2016

Hello @royaldark @MarkLL

The problem occurs only if installation initialize with this command.

wget https://github.com/mautic/mautic/archive/master.zip

If installation initialize with this command, the problem not occurs.

git clone https://github.com/mautic/mautic.git

But with command git clone install dev version (v2.4.1-dev)

The dev version is recommended for environment production?

What the correct form to iniatialize installation?

wget https://github.com/mautic/mautic/archive/master.zip

or ...

git clone https://github.com/mautic/mautic.git

Is possible install with command git clone the version latest release stable 2.4.0?

Best Regards,

Marcelo Amorim

@escopecz

This comment has been minimized.

@escopecz

This comment has been minimized.

Copy link
Member

@escopecz escopecz commented Dec 29, 2016

The Windows issue should be fixed by #3157

@comunidademagento

This comment has been minimized.

Copy link
Author

@comunidademagento comunidademagento commented Dec 29, 2016

Hi @escopecz

I read this - https://github.com/mautic/mautic#getting-started

I try install with this commands ...

wget https://github.com/mautic/mautic/archive/master.zip

With this command present the message in console after finish install

Script cp ./build/hooks/pre-commit ./.git/hooks/pre-commit handling the post-install-cmd event returned with error code 1

git clone https://github.com/mautic/mautic.git

With this command install dev version v2.4.1-dev

How to install with command git clone the version latest release stable 2.4.0?

Thanks!!!

@comunidademagento

This comment has been minimized.

Copy link
Author

@comunidademagento comunidademagento commented Dec 29, 2016

Hi @escopecz

I can install the version latest release 2.4.0 with this command.

git clone --branch 2.4.0 https://github.com/mautic/mautic.git

Is this mode of installation is correct too?

Thanks!!!

@escopecz

This comment has been minimized.

Copy link
Member

@escopecz escopecz commented Dec 29, 2016

@comunidademagento read also this: https://github.com/mautic/mautic#disclaimer The GitHub version is not recommended for production.

@comunidademagento

This comment has been minimized.

Copy link
Author

@comunidademagento comunidademagento commented Dec 29, 2016

@escopecz

======== DOWNLOAD PACKAGE FROM WEBSITE MAUTIC.ORG ========

I download the same version latest release 2.4.0 in this link.

https://www.mautic.org/download/

I descompact and install by browser.

Do you recommend installing this form?

The updates work normally with this type of installation?

======== INSTALL BY COMPOSER ========

I this page inform the process install with composer.

https://github.com/mautic/mautic

Do you recommend install by composer?

The problem install by composer with download by command wget https://github.com/mautic/mautic/archive/master.zip

Present this problem in console after finish install.

Script cp ./build/hooks/pre-commit ./.git/hooks/pre-commit handling the post-install-cmd event returned with error code 1

======== LATEST VERSION STABLE AVAILABLE IN GITHUB ========

The version latest release 2.4.0 available in Github is not recommended for production too?

git clone --branch 2.4.0 https://github.com/mautic/mautic.git

Sorry, I don't undertand why the latest release available in Mautic repository in Github is not recommended for production, If is the same version available for download in Mautic.Org

Could you clarify, please?

======== YOUR RECOMMENDATION TYPE FOR INSTALLATION ========

What is the best way you consider for installation?

Thanks!!!

@MarkLL

This comment has been minimized.

Copy link
Contributor

@MarkLL MarkLL commented Dec 29, 2016

Hi @comunidademagento here's my take on it - bear in mind, i'm new here -- If you want to get the production version you should go to the main download page: https://www.mautic.org/download/ fill in your email and it downloads straight away. That comes with the vendor directory already populated, bootstrap.php.cache and a clean cache area.

Then there is no reason to worry about having to run composer and seeing the error. This last line is Only relevant to a development environment anyway and the fact it fails does not prevent the install from working.

Anything from Git needs to be run through a build process to "clean it up" and prepare it for production. This is not a path to go down for the faint-hearted.
Just my 2c's

@comunidademagento

This comment has been minimized.

Copy link
Author

@comunidademagento comunidademagento commented Dec 29, 2016

Thanks @MarkLL for your comments.

@escopecz

I waiting your feedback about this topics.

Thanks!!!

======== DOWNLOAD PACKAGE FROM WEBSITE MAUTIC.ORG ========

I download the same version latest release 2.4.0 in this link.

https://www.mautic.org/download/

I descompact and install by browser.

Do you recommend installing this form?

The updates work normally with this type of installation?

======== INSTALL BY COMPOSER ========

I this page inform the process install with composer.

https://github.com/mautic/mautic

Do you recommend install by composer?

The problem install by composer with download by command wget https://github.com/mautic/mautic/archive/master.zip

Present this problem in console after finish install.

Script cp ./build/hooks/pre-commit ./.git/hooks/pre-commit handling the post-install-cmd event returned with error code 1

======== LATEST VERSION STABLE AVAILABLE IN GITHUB ========

The version latest release 2.4.0 available in Github is not recommended for production too?

git clone --branch 2.4.0 https://github.com/mautic/mautic.git

Sorry, I don't undertand why the latest release available in Mautic repository in Github is not recommended for production, If is the same version available for download in Mautic.Org

Could you clarify, please?

======== YOUR RECOMMENDATION TYPE FOR INSTALLATION ========

What is the best way you consider for installation?

Thanks!!!

@LennyLip

This comment has been minimized.

Copy link

@LennyLip LennyLip commented Jan 18, 2017

+1 get this error in debian 8.7.1

> cp ./build/hooks/pre-commit ./.git/hooks/pre-commit
cp: cannot create regular file ‘./.git/hooks/pre-commit’: No such file or directory
Script cp ./build/hooks/pre-commit ./.git/hooks/pre-commit handling the post-install-cmd event returned with error code 1

@BrixCRM

This comment has been minimized.

Copy link

@BrixCRM BrixCRM commented Feb 9, 2017

Can I make some recommendations:

  • use git init, or a request-for-change to allow composer to work w/o GIT
  • use Bourne Shell syntax:
test -e .git && { cp ....; } || { ....; }
@diegofcv

This comment has been minimized.

Copy link

@diegofcv diegofcv commented Feb 23, 2017

I had the same problem.
I suggest that the statement about having the package of mautic.org used to production should be a little more available. The information "If you would like a different format or want to see the files first you can view those directly within the repository." at the download page lead me to understand that I could normally use the Github Zip. To download it in the server this one is easy to get, as the URL is directly available.

@escopecz

This comment has been minimized.

Copy link
Member

@escopecz escopecz commented Feb 23, 2017

@comunidademagento the zip package at mautic.org/download went through the build process so you don't have to do it and deal with problems along the way. That's why it's recommended for production, for normal users. If you want to use the GitHub version for production, that's fine too, but you have to take care of the building process.

For those having the errors during the build process, review, test and comment on the PRs linked to this issue, please. It will help to get them merged.

@comunidademagento

This comment has been minimized.

Copy link
Author

@comunidademagento comunidademagento commented Feb 23, 2017

@escopecz Thanks for this instructions.

@moltar

This comment has been minimized.

Copy link

@moltar moltar commented Apr 14, 2017

the zip package at mautic.org/download went through the build process so you don't have to do it and deal with problems along the way.

But it is not possible to automate the install with the form downloads. E.g. if I'm using Ansible to install mautic, then it is not possible to do from the form.

I think GitHub releases should also be already pre-built.

I'm getting the same error as OP on CentOS 7. It is simply because .git dir is not present if it is not a checkout.

@escopecz escopecz closed this May 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants
You can’t perform that action at this time.