wesleytodd / YeoPress

A Yeoman generator for WordPress
Other
1.08k stars 163 forks source link

Strange issue with installing as submodule and NOT using git #176

Closed Chrisedmo closed 8 years ago

Chrisedmo commented 8 years ago

I have been using this for a while now, and I'm not sure if it was an upgrade or that fact that i normally use git.

But I tried to run my usual set up WITHOUT git. And i get the following error:

fatal: Not a git repository (or any of the parent directories): .git

Error: { [Error: Command failed: /bin/sh -c git submodule add "git://github.com/WordPress/WordPress.git" "cms"
fatal: Not a git repository (or any of the parent directories): .git
]
  killed: false,
  code: 128,
  signal: null,
  cmd: '/bin/sh -c git submodule add "git://github.com/WordPress/WordPress.git" "cms"' }

Error: { [Error: spawn /bin/sh ENOENT]
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn /bin/sh',
  path: '/bin/sh',
  cmd: '/bin/sh -c git checkout "4.3.1"' }

I just ran it again, but said yes to git and it worked?

Toddses commented 8 years ago

The submodule option essentially is saying you want to install WordPress as a git submodule. If you say you don't want to use git, then it has no idea how to install a git submodule, as there's no git repository in your install directory.

That said, on the YeoPress side, we probably shouldn't allow users to try and install a git submodule unless they are using git as well.

wesleytodd commented 8 years ago

173 fixes the issue of showing it when we shouldn't. I just merged and and will publish asap. published