Skip to content

Commit bc0e36e

Browse files
committed
Rename skipInstall to skip-install
1 parent a404fb7 commit bc0e36e

4 files changed

Lines changed: 11 additions & 7 deletions

File tree

browser/model/installable-item.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class InstallableItem {
131131
}
132132

133133
isDownloadRequired() {
134-
return !this.downloaded;
134+
return this.useDownload && !this.downloaded;
135135
}
136136

137137
setDownloadComplete() {

browser/services/componentLoader.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,21 @@ class DynamicClass {
9191
let klass = require(`../${modulePath}`);
9292
let obj = klass.default.convertor.fromJson(config);
9393
if(skipInstall) {
94-
obj.installAfterRequirements = installAfterRequirements.bind(obj);
95-
obj.checkFiles = function() {};
94+
obj.installAfterRequirements = skipInstallation.bind(this);
95+
obj.checkFiles = skipOperation.bind(this);
9696
obj.useDownload = false;
9797
}
9898
return obj;
9999
}
100100
}
101101

102-
function installAfterRequirements(progress, success) {
102+
function skipInstallation(progress, success) {
103103
progress.setStatus('Installing');
104104
success && success(true);
105105
}
106106

107+
function skipOperation() {
108+
return Promise.resolve();
109+
}
110+
107111
export default ComponentLoader;

gulpfile.babel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ gulp.task('run-clean', function(cb) {
116116
});
117117

118118
gulp.task('run', ['update-requirements', 'create-modules-link', 'electron-rebuild'], function(cb) {
119-
let skipInstall = process.argv.filter(name => name === '--skipInstall').length == 1 ? "skipInstall":"";
119+
let skipInstall = process.argv.filter(name => name === '--skip-install').length == 1 ? "skip-install":"";
120120
exec(path.join('node_modules', '.bin') + path.sep + 'electron transpiled ' + skipInstall, common.createExecCallback(cb));
121121
});
122122

main/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ app.on('ready', function() {
9393
if (process.platform === 'win32') {
9494
mainWindow.bundleTempFolder = process.argv.length > 1 ? process.argv[1].replace(/^--/, '') : undefined;
9595
}
96-
97-
mainWindow.skipInstall = process.argv.filter(name => name == 'skipInstall').length == 1;
96+
console.log(process.argv);
97+
mainWindow.skipInstall = process.argv.filter(name => name == 'skip-install').length == 1;
9898

9999
mainWindow.once('ready-to-show', () => {
100100
mainWindow.show();

0 commit comments

Comments
 (0)