mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Always guard leaking env variables on Windows with SETLOCAL/ENDOCAL
Windows-only
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
@echo off
|
||||
|
||||
SETLOCAL
|
||||
rem only if we are running from a checkout
|
||||
IF EXIST "%~dp0\.git" (
|
||||
rem verify that we have 7zip in the path
|
||||
@@ -37,4 +38,5 @@ IF EXIST "%~dp0\.git" (
|
||||
SET NODE_PATH=%~dp0\dev_bundle\lib\node_modules
|
||||
|
||||
"%~dp0\dev_bundle\bin\node.exe" "%~dp0\tools\main.js" %*
|
||||
ENDLOCAL
|
||||
|
||||
|
||||
@@ -1185,11 +1185,13 @@ files._generateScriptLinkToMeteorScript = function (scriptLocation) {
|
||||
|
||||
var newScript = [
|
||||
"@echo off",
|
||||
"set METEOR_INSTALLATION=%~dp0%",
|
||||
"SETLOCAL",
|
||||
"SET METEOR_INSTALLATION=%~dp0%",
|
||||
|
||||
// always convert to Windows path since this function can also be
|
||||
// called on Linux or Mac when we are building bootstrap tarballs
|
||||
"\"" + scriptLocationConverted + "\" %*",
|
||||
"ENDLOCAL",
|
||||
// add a comment with the destination of the link, so it can be read later
|
||||
// by files.readLinkToMeteorScript
|
||||
"rem " + scriptLocationConverted,
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
REM Find the top of the tools tree (not to be confused with the 'tools'
|
||||
REM directory in that tree)
|
||||
set TOOLS_DIR="%~dp0\..\..\.."
|
||||
SETLOCAL
|
||||
SET TOOLS_DIR="%~dp0\..\..\.."
|
||||
|
||||
REM Find our binary dependencies (node).
|
||||
set DEV_BUNDLE="%TOOLS_DIR%\dev_bundle"
|
||||
SET DEV_BUNDLE="%TOOLS_DIR%\dev_bundle"
|
||||
|
||||
REM Have at it!
|
||||
set NODE_PATH="%DEV_BUNDLE%\lib\node_modules"
|
||||
"%DEV_BUNDLE%\bin\node" "%~dp0\fake-mongod.js" %*
|
||||
SET NODE_PATH="%DEV_BUNDLE%\lib\node_modules"
|
||||
"%DEV_BUNDLE%\bin\node" "%~dp0\fake-mongod.js" %*
|
||||
ENDLOCAL
|
||||
|
||||
|
||||
Reference in New Issue
Block a user