mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
read engine version as string
This commit is contained in:
@@ -212,7 +212,8 @@ var files = module.exports = {
|
||||
// Read the '.engine_version.txt' file. If in a checkout, throw an error.
|
||||
getEngineVersion: function () {
|
||||
if (!files.in_checkout()) {
|
||||
return fs.readFileSync(path.join(files.getCurrentEngineDir(), '.engine_version.txt'));
|
||||
return fs.readFileSync(
|
||||
path.join(files.getCurrentEngineDir(), '.engine_version.txt'), 'utf8');
|
||||
} else {
|
||||
throw new Error("Unexpected. Git checkouts don't have engine versions.");
|
||||
}
|
||||
@@ -327,7 +328,7 @@ var files = module.exports = {
|
||||
else {
|
||||
if (!options.transform_contents) {
|
||||
// XXX reads full file into memory.. lame.
|
||||
fs.writeFileSync(full_to, fs.readFileSync(full_from))
|
||||
fs.writeFileSync(full_to, fs.readFileSync(full_from));
|
||||
} else {
|
||||
var contents = fs.readFileSync(full_from);
|
||||
contents = options.transform_contents(contents, f);
|
||||
|
||||
Reference in New Issue
Block a user