MCPcopy Index your code
hub / github.com/Unitech/pm2 / retrieveRemote

Function retrieveRemote

lib/API/Modules/TAR.js:55–73  ·  view source on GitHub ↗
(url, dest, cb)

Source from the content-addressed store, hash-verified

53}
54
55function retrieveRemote(url, dest, cb) {
56 Common.logMod(`Retrieving remote package ${url}...`)
57
58 var wget = spawn('wget', [url, '-O', dest, '-q'], {
59 stdio : 'inherit',
60 env: process.env,
61 windowsHide: true
62 })
63
64 wget.on('error', (err) => {
65 console.error(err.stack || err)
66 })
67
68 wget.on('close', (code) => {
69 if (code !== 0)
70 return cb(new Error('Could not download'))
71 return cb(null)
72 })
73}
74
75function installLocal(PM2, module_filepath, opts, cb) {
76 Common.logMod(`Installing package ${module_filepath}`)

Callers 1

installFunction · 0.85

Calls 2

cbFunction · 0.85
onMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…