mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-22 18:56:31 +00:00
Fix style issues detected by JSCS
This commit is contained in:
parent
3fb0a747f9
commit
13af009b4c
@ -127,7 +127,7 @@ imageWriter.service('ImageWriterService', function($q, $timeout, $log) {
|
||||
* ImageWriterService.setBurning(true);
|
||||
*/
|
||||
this.setBurning = function(status) {
|
||||
burning = !!status;
|
||||
burning = Boolean(status);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -105,7 +105,7 @@ selectionState.service('SelectionStateService', function() {
|
||||
* }
|
||||
*/
|
||||
this.hasDrive = function() {
|
||||
return !!self.getDrive();
|
||||
return Boolean(self.getDrive());
|
||||
};
|
||||
|
||||
/**
|
||||
@ -121,7 +121,7 @@ selectionState.service('SelectionStateService', function() {
|
||||
* }
|
||||
*/
|
||||
this.hasImage = function() {
|
||||
return !!self.getImage();
|
||||
return Boolean(self.getImage());
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -51,8 +51,7 @@ exports.require = function(app, callback) {
|
||||
// Don't keep the original parent process alive
|
||||
process.exit(0);
|
||||
});
|
||||
}
|
||||
else if (platform === 'win32') {
|
||||
} else if (platform === 'win32') {
|
||||
var elevator = require('elevator');
|
||||
|
||||
elevator.execute(process.argv, {}, function(error) {
|
||||
@ -64,8 +63,7 @@ exports.require = function(app, callback) {
|
||||
// Don't keep the original parent process alive
|
||||
process.exit(0);
|
||||
});
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
electron.dialog.showErrorBox(
|
||||
'You don\'t have enough permissions',
|
||||
'Please run this application as root or administrator'
|
||||
|
@ -37,11 +37,17 @@ var _ = require('lodash');
|
||||
exports.selectImage = function() {
|
||||
'use strict';
|
||||
|
||||
return new Promise(function(resolve, reject) {
|
||||
return new Promise(function(resolve) {
|
||||
electron.dialog.showOpenDialog({
|
||||
properties: [ 'openFile' ],
|
||||
filters: [
|
||||
{ name: 'IMG/ISO', extensions: [ 'img', 'iso' ] }
|
||||
{
|
||||
name: 'IMG/ISO',
|
||||
extensions: [
|
||||
'img',
|
||||
'iso'
|
||||
]
|
||||
}
|
||||
]
|
||||
}, function(file) {
|
||||
return resolve(_.first(file));
|
||||
|
@ -87,8 +87,8 @@ exports.writeImage = function(image, drive, onProgress) {
|
||||
}).then(function() {
|
||||
if (isWindows && drive.mountpoint) {
|
||||
return removedrive.ejectAsync(drive.mountpoint);
|
||||
} else {
|
||||
return umount.umountAsync(drive.device);
|
||||
}
|
||||
|
||||
return umount.umountAsync(drive.device);
|
||||
});
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user