All I'm trying to do is execute the cmd git submodule -q add -f --depth 1 https://github.com/user/repo node_modules/repo
via node, but I can't seem to get it to work.
var cmd = [
'git',
[
'submodule',
'--quiet',
'add',
'--force',
'--depth', '1',
(self.url.replace('git+', '')),
self.installTo
]
]
var git = spawn.apply(spawn, cmd)
git.stderr.on('data', log.error)
git.on('close', function (code, signal) {
// irrelevant because it errors out...
}
I get the following error in the terminal:
ERR! usage: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
or: git submodule [--quiet] init [--] [<path>...]
or: git submodule [--quiet] deinit [-f|--force] [--] <path>...
or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--reference <repository>] [--recursive] [--] [<path>...]
or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
or: git submodule [--quiet] foreach [--recursive] <command>
or: git submodule [--quiet] sync [--recursive] [--] [<path>...]