mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-18 10:46:34 +00:00
Merge branch 'master' of github.com:resin-io/resin-cli
This commit is contained in:
commit
679d48e86e
@ -1,5 +1,5 @@
|
||||
(function() {
|
||||
var _, async, capitano, commandOptions, elevate, image, mkdirp, npm, os, packageJSON, path, resin, visuals;
|
||||
var _, async, capitano, commandOptions, elevate, image, mkdirp, npm, os, packageJSON, path, resin, umount, visuals;
|
||||
|
||||
capitano = require('capitano');
|
||||
|
||||
@ -19,6 +19,8 @@
|
||||
|
||||
visuals = require('resin-cli-visuals');
|
||||
|
||||
umount = require('umount').umount;
|
||||
|
||||
commandOptions = require('./command-options');
|
||||
|
||||
npm = require('../npm');
|
||||
@ -131,10 +133,12 @@
|
||||
message = "This will completely erase " + params.device + ". Are you sure you want to continue?";
|
||||
return visuals.patterns.confirm(options.yes, message, callback);
|
||||
}, function(confirmed, callback) {
|
||||
var bar;
|
||||
if (!confirmed) {
|
||||
return done();
|
||||
}
|
||||
return umount(params.device, _.unary(callback));
|
||||
}, function(callback) {
|
||||
var bar;
|
||||
bar = new visuals.widgets.Progress('Writing Device OS');
|
||||
params.progress = _.bind(bar.update, bar);
|
||||
return image.write(params, callback);
|
||||
|
@ -7,6 +7,7 @@ mkdirp = require('mkdirp')
|
||||
resin = require('resin-sdk')
|
||||
image = require('resin-image')
|
||||
visuals = require('resin-cli-visuals')
|
||||
umount = require('umount').umount
|
||||
commandOptions = require('./command-options')
|
||||
npm = require('../npm')
|
||||
packageJSON = require('../../package.json')
|
||||
@ -155,6 +156,9 @@ exports.install =
|
||||
|
||||
(confirmed, callback) ->
|
||||
return done() if not confirmed
|
||||
umount(params.device, _.unary(callback))
|
||||
|
||||
(callback) ->
|
||||
bar = new visuals.widgets.Progress('Writing Device OS')
|
||||
params.progress = _.bind(bar.update, bar)
|
||||
image.write(params, callback)
|
||||
|
@ -66,6 +66,7 @@
|
||||
"resin-settings-client": "^1.0.0",
|
||||
"resin-vcs": "^1.2.0",
|
||||
"tmp": "^0.0.25",
|
||||
"umount": "^1.0.0",
|
||||
"underscore.string": "~2.4.0",
|
||||
"update-notifier": "^0.3.1"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user