-
Notifications
You must be signed in to change notification settings - Fork 586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Illegal Characters in Path error when using DocFx #2187
Comments
Yes the quotes look a bit broken |
As I found out, when escaping empty strings as
As I found out, escaping of quotes should be done using back ticks in PowerShell EDIT: Turns out escaping with backticks only works for powershell... |
@DigitalFlow Escaping empty strings as PR is welcome ;) |
@matthid Alright, I'll submit a PR to fix this. For the meantime: Process.shellExec is a temporary workaround: Process.shellExec
{ ExecParams.Empty with
Program = @"packages\docfx.console\tools\docfx.exe"
CommandLine = @"metadata ""docs\\docfx.json"""
Args = [] }
|> ignore I think the Args module won't be needed in here, as this is what is escaping my commands, which I don't want. I'll take a look at the Arguments module. |
@matthid I checked the Arguments.OfArgs function by using Arguments.OfArgs([| @"--output="""""; @"--fileFilter=""""" |]) Unfortunately this also produces the output that I do not want: |
But what you want is |
This broke in the refactoring of the ProcessModule, so you can use an older version as a workaround. let private stringParam (paramName,paramValue) = Process.stringParam (paramName, Process.quoteIfNeeded paramValue) Process.stringParam returns a @matthid: Is it intended that the ArgumentsModule returns quotes for an empty string? That seems strange. |
@kblohm yes because otherwise the invariant |
Or put in other words you cannot tell the difference between |
Description
When running DocFx targets from within FAKE, the execution breaks due to an illegal characters in path exception.
It was working previously and I did not change anything since the last successful runs, maybe a FAKE update broke it?
The error thrown is:
`
I tried copying the quoted parameters and removing the quotes and escapers from them. It worked afterwards, so it seems as if those parameters should not be escaped like that.
Repro steps
Steps to reproduce:
Clone repo from https:/DigitalFlow/FAKE-DocFx-Issue
Run build.cmd
Execution should fail with error as above
Expected behavior
There should be no illegal path error.
Actual behavior
An illegal characters in path error is being thrown.
Known workarounds
None that I know of.
Related information
`
C:\Git\FAKE-DocFx-Issue>dotnet --info
.NET Core SDK (gemäß "global.json"):
Version: 2.1.402
Commit: 3599f217f4
Laufzeitumgebung:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.402\
Host (useful for support):
Version: 2.1.4
Commit: 85255dde3e
.NET Core SDKs installed:
1.0.4 [C:\Program Files\dotnet\sdk]
2.1.103 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.300 [C:\Program Files\dotnet\sdk]
2.1.402 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
`
The text was updated successfully, but these errors were encountered: