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

dugite

Package Overview
Dependencies
Maintainers
3
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dugite - npm Package Compare versions

Comparing version 1.49.0 to 1.50.0

2

package.json
{
"name": "dugite",
"version": "1.49.0",
"version": "1.50.0",
"description": "Elegant bindings for Git",

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

@@ -29,20 +29,22 @@ const URL = require('url')

// compute the filename from the download source
const url = URL.parse(config.source)
const pathName = url.pathname
const index = pathName.lastIndexOf('/')
config.fileName = pathName.substr(index + 1)
if (config.source !== '') {
// compute the filename from the download source
const url = URL.parse(config.source)
const pathName = url.pathname
const index = pathName.lastIndexOf('/')
config.fileName = pathName.substr(index + 1)
const cacheDirEnv = process.env.DUGITE_CACHE_DIR
const cacheDirEnv = process.env.DUGITE_CACHE_DIR
const cacheDir = cacheDirEnv ? path.resolve(cacheDirEnv) : os.tmpdir()
const cacheDir = cacheDirEnv ? path.resolve(cacheDirEnv) : os.tmpdir()
try {
fs.statSync(cacheDir)
} catch (e) {
fs.mkdirSync(cacheDir)
try {
fs.statSync(cacheDir)
} catch (e) {
fs.mkdirSync(cacheDir)
}
config.tempFile = path.join(cacheDir, config.fileName)
}
config.tempFile = path.join(cacheDir, config.fileName)
return config

@@ -49,0 +51,0 @@ }

@@ -13,4 +13,4 @@ const fs = require('fs')

function extract (source, callback) {
const extractor = tar.Extract({path: config.outputPath})
function extract(source, callback) {
const extractor = tar.Extract({ path: config.outputPath })
.on('error', function (error) { callback(error) })

@@ -64,3 +64,12 @@ .on('end', function () { callback() })

req.on('error', function (error) {
console.log(`Error raised while downloading ${config.source}`, error)
if (error.code === 'ETIMEDOUT') {
console.log(
`A timeout has occurred while downloading '${config.source}' - check ` +
`your internet connection and try again. If you are using a proxy, ` +
`make sure that the HTTP_PROXY and HTTPS_PROXY environment variables are set.`,
error
)
} else {
console.log(`Error raised while downloading ${config.source}`, error)
}
process.exit(1)

@@ -104,3 +113,11 @@ })

mkdirp(config.outputPath, function (error) {
if (config.source === '') {
console.log(
`Skipping downloading embedded Git as platform '${process.platform}' is not supported.`
)
console.log(`To learn more about using dugite with a system Git: https://git.io/vF5oj`)
process.exit(0)
}
mkdirp(config.outputPath, function(error) {
if (error) {

@@ -107,0 +124,0 @@ console.log(`Unable to create directory at ${config.outputPath}`, error)

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