github / github/codeql-cli-binaries

unable to create database if there is a space in the command argument

未關閉
#73 10 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
CLI
主要語言
沒有語言資料
星號
1k
分支
184
PR 合併指標
30 天內沒有已合併 PR

描述

From, https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/static-tools-and-codeql

C:\codeql-home>C:\codeql-home\codeql\codeql.cmd database create -l=cpp -s=C:\codeql-home\drivers\kmdf -c "msbuild /t:rebuild "C:\codeql-home\drivers\kmdf\kmdfecho.sln" /p:UseSharedCompilation=false" "C:\codeql-home\databases\kmdf" -j 0

If the above command is modified to incorporate configuration the database creation fails,
C:\codeql-home>C:\codeql-home\codeql\codeql.cmd database create -l=cpp -s=C:\codeql-home\drivers\kmdf -c "msbuild /t:rebuild "C:\codeql-home\drivers\kmdf\kmdfecho.sln" /p:Configuration="win10 Debug" /p:UseSharedCompilation=false" "C:\codeql-home\databases\kmdf" -j 0

Error:
The system cannot find the file specified.
Invalid value for positional parameter at index 0 (): cannot convert 'Debug /p:UseSharedCompilation=false' to Path (java.nio.file.InvalidPathException: Trailing char < > at index 5: Debug /p:UseSharedCompilation=false)
Try codeql database create --help for usage help.

However the same command using msbuild succeeds. Also the same command without space works,
C:\codeql-home>C:\codeql-home\codeql\codeql.cmd database create -l=cpp -s=C:\codeql-home\drivers\kmdf -c "msbuild /t:rebuild "C:\codeql-home\drivers\kmdf\kmdfecho.sln" /p:Configuration="win10Debug" /p:UseSharedCompilation=false" "C:\codeql-home\databases\kmdf" -j 0

Creates database successfully.
Initializing database at C:\codeql-home\databases\kmdf.
Running build command: [msbuild, /t:rebuild, kmdfecho.sln, /p:Configuration=win10Debug, /p:UseSharedCompilation=false]

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。