Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

git-clone

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-clone - npm Package Compare versions

Comparing version 0.0.4 to 0.1.0

test/.npmignore

22

index.js

@@ -12,2 +12,3 @@ var spawn = require('child_process').spawn;

var git = opts.git || 'git';
var args = ['clone'];

@@ -24,7 +25,10 @@

var process = spawn(opts.git || 'git', args);
var process = spawn(git, args);
process.on('close', function(status) {
if (status == 0) {
cb && cb();
if (opts.checkout) {
_checkout();
} else {
cb && cb();
}
} else {

@@ -35,2 +39,14 @@ cb && cb(new Error("'git clone' failed with status " + status));

function _checkout() {
var args = ['checkout', opts.checkout];
var process = spawn(git, args, { cwd: targetPath });
process.on('close', function(status) {
if (status == 0) {
cb && cb();
} else {
cb && cb(new Error("'git checkout' failed with status " + status));
}
});
}
}

2

package.json
{
"name": "git-clone",
"version": "0.0.4",
"version": "0.1.0",
"description": "Clone a git repository",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -23,4 +23,5 @@ # git-clone

* `git`: path to `git` binary; default: `git`.
* `shallow`: when `true`, clone with depth 1.
* `git`: path to `git` binary; default: `git` (optional).
* `shallow`: when `true`, clone with depth 1 (optional).
* `checkout`: revision/branch/tag to check out (optional).

@@ -27,0 +28,0 @@ ## Copyright & License

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc