Merge pull request #1085 from balena-io/restore-fix

device-state: correctly call volume creation on backup restore step
This commit is contained in:
Gergely Imreh 2019-09-11 15:57:30 +01:00 committed by GitHub
commit 806adb9ef6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -452,7 +452,7 @@ module.exports = class DeviceState extends EventEmitter
volume.remove()
.catch(NotFoundError, _.noop)
.then =>
@applications.volumes.createFromPath({ appId, name: volumeName, config: volumes[volumeName] }, path.join(backupPath, volumeName))
@applications.volumes.createFromPath({ appId, name: volumeName }, volumes[volumeName], path.join(backupPath, volumeName))
else
throw new Error("Invalid backup: #{volumeName} is present in backup but not in target state")
.then ->