Skip to content

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:hello@dev-company.com 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:hello@dev-company.com 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

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

Successfully merging this pull request may close these issues.

3 participants