Skip to content

Commit

Permalink
Remove the --openwrt option from the restore command
Browse files Browse the repository at this point in the history
  • Loading branch information
majgis committed Aug 1, 2016
1 parent 9fa0438 commit 27a33b6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
5 changes: 0 additions & 5 deletions bin/tessel-2.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,6 @@ parser.command('restore')
log.level(options.loglevel);
callControllerWith('restoreTessel', options);
})
.option('openwrt', {
abbr: 'o',
flag: true,
help: 'Restore a factory version of OpenWrt'
})
.help('Restore your Tessel by installing the factory version of OpenWrt.');

makeCommand('restart')
Expand Down
4 changes: 0 additions & 4 deletions lib/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,6 @@ controller.provisionTessel = function(opts) {


controller.restoreTessel = function(opts) {
if (!opts.openwrt) {
return Promise.reject('You must use the --openwrt option to restore.');
}

opts.usb = true;
opts.lan = false;
opts.altSetting = 1;
Expand Down
10 changes: 5 additions & 5 deletions lib/tessel/restore.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ var update = require('../update-fetch');
var log = require('../log');
var flash = require('../flash');

Tessel.prototype.restore = function restore(opts) {
Tessel.prototype.restore = function restore() {
var usbConnection = this.connection;
return new Promise(function(resolve, reject) {
if (opts.openwrt) {
return new Promise((resolve, reject) => {

log.info('Proceeding with updating OpenWrt...');

// download images
Expand All @@ -19,7 +19,7 @@ Tessel.prototype.restore = function restore(opts) {
resolve();
});
});
}
return reject(new Error('You need to specify --openwrt to proceed.'));


});
};

0 comments on commit 27a33b6

Please sign in to comment.