tolerate the --yes param to device init

This commit is contained in:
Eugene Mirotin 2017-06-08 23:55:56 +03:00
parent 1cfe64e4a7
commit 8d91a5732a
3 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Gzip images when uploading in `resin deploy`
- Show a clear message immediately as the deploy starts, if we're deploying an image.
- Allow OS version selection when doing `resin device init`
- Actually tolerate the `--yes` param to `resin device init`
### Fixed

View File

@ -311,6 +311,9 @@ exports.init = {
return capitanoRunAsync(configureCommand).then(function() {
var osInitCommand;
osInitCommand = "os initialize '" + tempPath + "' --type " + application.device_type;
if (options.yes) {
osInitCommand += ' --yes';
}
return capitanoRunAsync(osInitCommand);
})["catch"](function(error) {
return resin.models.device.remove(device.uuid)["finally"](function() {

View File

@ -409,6 +409,8 @@ exports.init =
capitanoRunAsync(configureCommand)
.then ->
osInitCommand = "os initialize '#{tempPath}' --type #{application.device_type}"
if options.yes
osInitCommand += ' --yes'
capitanoRunAsync(osInitCommand)
# Make sure the device resource is removed if there is an
# error when configuring or initializing a device image