mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Allow meteor.bat script to set its own installation location
This commit is contained in:
@@ -1161,7 +1161,11 @@ _.extend(files.KeyValueFile.prototype, {
|
||||
|
||||
files.getHomeDir = function () {
|
||||
if (process.platform === "win32") {
|
||||
var homeDir = process.env.LOCALAPPDATA || process.env.APPDATA;
|
||||
var homeDir =
|
||||
process.env.METEOR_INSTALLATION ||
|
||||
process.env.LOCALAPPDATA ||
|
||||
process.env.APPDATA;
|
||||
|
||||
return files.convertToStandardPath(homeDir);
|
||||
}
|
||||
|
||||
@@ -1185,6 +1189,13 @@ files._generateScriptLinkToMeteorScript = function (scriptLocation) {
|
||||
|
||||
var newScript = [
|
||||
"@echo off",
|
||||
// set the installation path to the grand-parent folder of this script
|
||||
"set DOT_METEOR=\"%~dp0%\"",
|
||||
"pushd %DOT_METEOR%",
|
||||
"cd ..",
|
||||
"set METEOR_INSTALLATION=\"%cd%\"",
|
||||
"popd",
|
||||
|
||||
// always convert to Windows path since this function can also be
|
||||
// called on Linux or Mac when we are building bootstrap tarballs
|
||||
"\"" + scriptLocationConverted + "\" %*",
|
||||
|
||||
Reference in New Issue
Block a user