Skip to content

Commit

Permalink
rm -rf npm submodule command
Browse files Browse the repository at this point in the history
Noticed today that 'npm submodule' is broken in npm 2.0.

Went digging, and thought 'Hey, how did this EVER work?'

Dug a bit deeper, and found that this command was actually let go way
back in the summer of 2013, and had been hanging around ever since due
to a glitch in the system.

So, with this patch, we've 'fixed the glitch', removing it from the set
of npm commands.

Fix npm#6369
  • Loading branch information
isaacs authored and othiym23 committed Oct 2, 2014
1 parent 3e431f9 commit 1e64473
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 148 deletions.
28 changes: 0 additions & 28 deletions doc/api/npm-submodule.md

This file was deleted.

1 change: 0 additions & 1 deletion doc/cli/npm-explore.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ The shell to run for the `npm explore` command.

## SEE ALSO

* npm-submodule(1)
* npm-folders(5)
* npm-edit(1)
* npm-rebuild(1)
Expand Down
28 changes: 0 additions & 28 deletions doc/cli/npm-submodule.md

This file was deleted.

1 change: 0 additions & 1 deletion lib/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ var commandCache = {}
, "update"
, "outdated"
, "prune"
, "submodule"
, "pack"
, "dedupe"

Expand Down
90 changes: 0 additions & 90 deletions lib/submodule.js

This file was deleted.

5 changes: 5 additions & 0 deletions lib/utils/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,20 @@ var exec = require("child_process").execFile
, npm = require("../npm.js")
, which = require("which")
, git = npm.config.get("git")
, assert = require("assert")
, log = require("npmlog")

function prefixGitArgs() {
return process.platform === "win32" ? ["-c", "core.longpaths=true"] : []
}

function execGit(args, options, cb) {
log.info("git", args)
return exec(git, prefixGitArgs().concat(args || []), options, cb)
}

function spawnGit(args, options, cb) {
log.info("git", args)
return spawn(git, prefixGitArgs().concat(args || []), options)
}

Expand All @@ -33,6 +37,7 @@ function whichGit(cb) {
}

function whichAndExec(args, options, cb) {
assert.equal(typeof cb, "function", "no callback provided")
// check for git
whichGit(function (err) {
if (err) {
Expand Down

0 comments on commit 1e64473

Please sign in to comment.