sam20908 / vscode-fastolympiccoding

Competitive programming in VSCode made easy
MIT License
4 stars 0 forks source link

Can't compile file when path contains space #10

Closed YuiHrsw closed 3 days ago

YuiHrsw commented 2 weeks ago

If I place .cpp file in a folder which name contains space, the compilation failed. Here is my runSettings:

    "fastolympiccoding.runSettings": {
        ".cpp": {
            "compileCommand": "g++ -std=c++20 -D_GLIBCXX_DEBUG ${file} -o ${fileDirname}/${fileBasenameNoExtension}${exeExtname}",
            "runCommand": "${fileDirname}/${fileBasenameNoExtension}${exeExtname}"
        },
        ".py": {
            "runCommand": "python ${file}"
        },
    }

I tried use the \" to wrap the {file}, but it still doesn't work.

sam20908 commented 2 weeks ago

Will fix in 1.0.4, as I compiled myself a big TODO list for the release lol

sam20908 commented 1 week ago

Actually, I might fix this in a later version, as apparently the underlying cause is quite a rabbit hole...

Sorry, no spaces will have to do for now

sam20908 commented 5 days ago

Update: This is technically a Node.js issue, but some extensions have been proven to handle it via tedious dark magic, which I probably do not know. If someone knows how to solve this problem, I'm open to comments/PRs.

I'm leaving this issue open to remind myself to revisit this bug in the future.

sam20908 commented 4 days ago

I believe I found a 200iq way

sam20908 commented 3 days ago

Fixed by ca98949a1089d03cc3c65913786de94d262d8383

This is a backward-compatible change, but the support for spaces is updated in the new example run settings on README