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

Nothing happens after before:init hook runs #574

Closed
acal11 opened this issue Nov 15, 2019 · 7 comments
Closed

Nothing happens after before:init hook runs #574

acal11 opened this issue Nov 15, 2019 · 7 comments

Comments

@acal11
Copy link

acal11 commented Nov 15, 2019

I have a before:init hook as follows: "before:init": ["npm run test:release", "npm run lint"], and when I run it I see npm run test:release in the console. It completes and the green tick shows up but nothing happens next - the console just hangs there.

I've tried switching the order of the commands too and the same thing happens after the first command is run.

The two commands above are:
"test:release": "cross-env CI=true react-scripts test --env=jsdom", "lint": "prettier --check src/**/* && eslint src/**/*",

If I remove the hook it works fine.
It wasn't the removing the hook that made it work, but rather supplying --V --VV to the command...

@webpro
Copy link
Collaborator

webpro commented Nov 15, 2019

So when you use release-it -v or -vv it no longer hangs for you?

@acal11
Copy link
Author

acal11 commented Nov 15, 2019

So when you use release-it -v or -vv it no longer hangs for you?

Correct, it hangs with any hooks without verbose mode but works with the verbose flags

@webpro
Copy link
Collaborator

webpro commented Nov 15, 2019

Not sure what command/output causes this. Apparently in your situation it doesn't matter which command is executed first, right? Then I don't know what causes this.

Can you provide a repo or something I can check out?

@webpro
Copy link
Collaborator

webpro commented Nov 15, 2019

Out of curiosity, I tried a basic create-react-app setup (as react-scripts looks familiar to me). This works fine. I'm getting errors where I should (prettier, eslint, test) and the process exits properly. Or continues with the release-it process when the checks pass.

Let me know if you have a similar setup and maybe have customized something that causes the issue.

Use DEBUG=release-it:* release-it [...] for more details (and maybe see where it hangs).

@websilone
Copy link

Hello,
I had the same issue (i.e. the script was not exiting after finishing the tasks).
I solved the problem by disabling the metrics (with the --disable-metrics flag).
@webpro Perhaps you can have a look on this side...
(I ran the script with the debug mode but didn't see any hint about the metrics having issue).

@webpro
Copy link
Collaborator

webpro commented Jan 11, 2020

Thanks @websilone. I've released https://github.com/release-it/release-it/releases/tag/12.5.0-next.3 that might fix this issue. If you guys could try this on your environment, that would be great. Not sure what else I could do about this. I guess the request to GA might fail e.g. when behind a proxy or something, but it should fail silently after 300ms.

@webpro
Copy link
Collaborator

webpro commented Feb 23, 2020

I'm closing this issue. If someone still has this problem, please let me know. Ideally, this comes with a reproducible case.

@webpro webpro closed this as completed Feb 23, 2020
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

3 participants