Skip to content

emcc.bat prints out extra lines if emsdk is installed in path with spaces (HostOS: Windows) #20913

@aportale

Description

@aportale

When executing emcc.bat -dumpversion, I would usually just get an output with a version number. If emsdk is installed in a path that contains spaces, I get more output than expected.

Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.50 (047b825)
clang version 18.0.0 (https://github.com/llvm/llvm-project 14028ec0a62210d68a4dd7a046ac79c8c3b7727e)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: C:\Users\alportal\path with spaces\emsdk\upstream\bin

Failing command line in full:
emcc.bat -dumpversion

If emsdk is installed within a path that contains spaces, the output contains extra lines:

c:\Users\alportal\path with spaces\emsdk>set MYDIR=C:\Users\alportal\path with spaces\emsdk\upstream\emscripten\

c:\Users\alportal\path with spaces\emsdk>goto FOUND_MYDIR
3.1.50

This extra output of the compiler can cause issues, like for example in the Qt Creator IDE: QTCREATORBUG-29758 QTCREATORBUG-29981

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions