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

Fix for: Git clone timeout #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

liamb13
Copy link

@liamb13 liamb13 commented Feb 16, 2022

Fixes the following:

× 2. Operator is cloning webpack repository
Error - Error: Command failed: git clone https://github.com/wp-strap/wordpress-webpack-workflow.git "D:\plugins\test-plugin/wordpress-webpack-workflow"

Description

This PR adds a fix for git clone time outs. The generator breaks after 45 seconds if git clone hasn't completed for wordpress-webpack-workflow. However, there is no indication as to why.

I've added an additional question to the start of the generator asking for a users Internet speed: Fast (30s), Standard (45s), Slow (60s), Slowest (75s) and Custom.

There's an additional prompt if the above error is hit:

git clone may have timed out. Your timeout setting is: '1000' milliseconds. Try again with a higher number.

While there are no errors with the code, it could potentially be cleaned up.

Related Issue

Issue present in wordpress-plugin-boilerplate:
#brandonkramer/wordpress-plugin-boilerplate#2

Motivation and Context

Initially I assumed it was an issue with path. Backslash instead of forward slash on Windows. After changing that, I got lucky with my internet speed and was able to successfully run the generator in a test folder.

When I returned to my plugins folder and attempted to run the generator, I received the same error.

As this error prevents the generator from running, there should be a justification to why it happened. Along with a way to fix it.

How Has This Been Tested?

Internal testing:

  • node ./strap.js plugin
  • node ./strap.js plugin "projectName:Cool Plugin" "description:Test the plugin" "pluginVersion:1.0.0" license:MIT "author:The Dev Company" authorEmail:[email protected] url:www.dev-company.com webpack:Y codesniffer:Y codeception:Y travisCi:Y
  • node ./strap.js webpack
  • node ./strap.js webpack "projectName:Cool Plugin" "author:The Dev Company" authorEmail:[email protected] url:www.dev-company.com css:Sass+PostCSS
  • Ran npx wp-strap plugin and npx wp-strap webpack by editting local files.

OS Tested

  • Windows 10
  • macOS

@cokacho
Copy link

cokacho commented Nov 13, 2022

Hello, I had the same problem and I fixed it changing the ./project/controllers/operator.js:21 from 45000 to 145000

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

Successfully merging this pull request may close these issues.

None yet

3 participants