pear-runtime-updater 3.0.5 → 3.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -117,9 +117,11 @@ module.exports = class PearRuntimeUpdater extends ReadyResource {
|
|
|
117
117
|
|
|
118
118
|
const local = new Localdrive(next)
|
|
119
119
|
|
|
120
|
+
const prefix = prefixFor(host, this.name)
|
|
121
|
+
const exists = await co.get(prefix)
|
|
122
|
+
if (!exists) throw new Error('update not found')
|
|
120
123
|
this.updating = true
|
|
121
124
|
this.emit('updating')
|
|
122
|
-
const prefix = prefixFor(host, this.name)
|
|
123
125
|
for await (const data of co.mirror(local, { prefix })) {
|
|
124
126
|
this.emit('updating-delta', data)
|
|
125
127
|
}
|