瀏覽代碼

amberc.js: fully assemble configuration before checking it

Manfred Kroehnert 10 年之前
父節點
當前提交
8ee008c856
共有 1 個文件被更改,包括 6 次插入8 次删除
  1. 6 8
      cli/support/amberc.js

+ 6 - 8
cli/support/amberc.js

@@ -131,15 +131,13 @@ AmberC.prototype.main = function(configuration, finished_callback) {
 		console.log = function() {};
 	}
 
-	var self = this;
+	// the evaluated compiler will be stored in this variable (see create_compiler)
+	configuration.smalltalk = {};
+	configuration.kernel_libraries = this.kernel_libraries;
+	configuration.compiler_libraries = this.compiler_libraries;
+	configuration.amber_dir = this.amber_dir;
+
 	check_configuration(configuration)
-	.then(function(configuration) {
-		configuration.smalltalk = {}; // the evaluated compiler will be stored in this variable (see create_compiler)
-		configuration.kernel_libraries = self.kernel_libraries;
-		configuration.compiler_libraries = self.compiler_libraries;
-		configuration.amber_dir = self.amber_dir;
-		return configuration;
-	}, logError)
 	.then(collect_st_files, logError)
 	.then(collect_js_files, logError)
 	.then(resolve_kernel, logError)