(version, degitError)
| 125 | } |
| 126 | |
| 127 | function makeDegitFailureThenTarballSuccess(version, degitError) { |
| 128 | const calls = []; |
| 129 | const stub = function (bin, args) { |
| 130 | calls.push({ bin, args: Array.isArray(args) ? args.slice() : [] }); |
| 131 | if (bin === process.execPath) { |
| 132 | const archivePath = args[3]; |
| 133 | fs.writeFileSync(archivePath, makeReleaseTarball(version)); |
| 134 | return ''; |
| 135 | } |
| 136 | throw degitError; |
| 137 | }; |
| 138 | stub.calls = calls; |
| 139 | return stub; |
| 140 | } |
| 141 | |
| 142 | function populateFakeInstall(root) { |
| 143 | // Package identity (required by the guard at the top of executeForceUpdate) |
no outgoing calls
no test coverage detected