start-shell.bat fails on text that "was unexpected at this time"

RESOLVED DUPLICATE of bug 1260823

Status

mozilla.org
MozillaBuild
RESOLVED DUPLICATE of bug 1260823
2 years ago
2 years ago

People

(Reporter: myk, Unassigned)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
When I run start-shell.bat, it fails with "\Info-ZIP\ was unexpected at this time."  Turning ECHO on shows that this happens on http://hg.mozilla.org/mozilla-build/file/9ed6b422fee9/start-shell.bat#l58:

  SET PATH=%PATH%;!LLVMDIR!\bin

As the result of that line is echoed right after the error message:

> c:\mozilla-build>REG QUERY "!LLVMKEY!" /ve  1>nul 2>nul
> \Info-ZIP\ was unexpected at this time.
> 
> c:\mozilla-build>  SET PATH=C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;
> C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Info-ZIP\;C:\Program Files\Sublime Text 3\;C:\Program
>  Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Micro
> soft SQL Server\120\Tools\Binn\;C:\Program Files\nodejs\;C:\Users\myk\AppData\Roaming\npm;c:\mozilla-build\moztools-x64\
> bin;!LLVMDIR!\bin

The "unexpected" text is shortly after the first space (and the first parentheses) in my path, although I don't know why that particular SET PATH call would fail because of that.  The earlier SET PATH call to set moztools works fine:

  SET PATH=%PATH%;%MOZ_TOOLS%\bin

However, I think this is because of delayed expansion, in which case quoting the value of the path with the variable being delayfully expanded should resolve the problem:

  SET PATH="%PATH%;!LLVMDIR!\bin"
(Reporter)

Comment 1

2 years ago
Created attachment 8738220 [details] [diff] [review]
quote value containing delayfully-expanded variable
Attachment #8738220 - Flags: review?(gps)
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1260823
(Reporter)

Updated

2 years ago
Attachment #8738220 - Flags: review?(gps)
You need to log in before you can comment on or make changes to this bug.