Path strings should be quoted or have whitespace escaped
See original GitHub issueEnvironment:
- fresh install of
oad
fromnpm install -g oav
. I’ve never used it before. Version installed was0.1.9
. - Windows 11
- .NET version 6.0.402
When I run oad compare my-old-spec.json my-new-spec.json
as per the instructions, I get the file not found errors. If I manually create these files out of curiosity, I still get an error.
# Initial error
> oad compare ..\..\stable\2022-01-01\redisenterprise.json .\redisenterprise.json
File "C:\Users\jantache\AppData\Local\Temp\old.json" not found.
# Error after manually creating old.json
> oad compare ..\..\stable\2022-01-01\redisenterprise.json .\redisenterprise.json
File "C:\Users\jantache\AppData\Local\Temp\new.json" not found.
# Error after manually creating both new.json and old.json
> oad compare ..\..\stable\2022-01-01\redisenterprise.json .\redisenterprise.json
Error: Command failed: dotnet C:\Program Files\WindowsPowerShell\Modules\nvm\2.5.1\vs\v14.18.1\node_modules\oad\lib\dlls\OpenApiDiff.dll -o C:\Users\jantache\AppData\Local\Temp\old.json -n C:\Users\jantache\AppData\Local\Temp\new.json -JsonValidationMessages
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but dotnet-C:\Program does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
at ChildProcess.exithandler (child_process.js:383:12)
at ChildProcess.emit (events.js:400:28)
at maybeClose (internal/child_process.js:1058:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5) {
killed: false,
code: 1,
signal: null,
cmd: 'dotnet C:\\Program Files\\WindowsPowerShell\\Modules\\nvm\\2.5.1\\vs\\v14.18.1\\node_modules\\oad\\lib\\dlls\\OpenApiDiff.dll -o C:\\Users\\jantache\\AppData\\Local\\Temp\\old.json -n C:\\Users\\jantache\\AppData\\Local\\Temp\\new.json -JsonValidationMessages'
}
Issue Analytics
- State:
- Created 10 months ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
What is the correct escaping or quoting of whitespace in a ...
I have tried the following forms of quoting or escaping: Vanilla whitespace: !path /home/stewart/white space test/example-1.0.0-SNAPSHOT/target/ ...
Read more >How to Escape Spaces in File Paths on the Windows ...
To escape spaces in a Windows file path, put double quotation marks around the section of the path with a space in it....
Read more >Why I can't escape spaces on a bash script? [duplicate]
The double-quotes turns on quoting (a form which has some magic) and the backslash is capable of quoting a single character following it....
Read more >How do I escape spaces in command line in Windows ...
It almost all works for me, but have you perhaps tried line5.. escaping the space with a caret symbol (^)
Read more >Quotation marks with strings in the AWS CLI
Using quotation marks around strings that contain white spaces. Parameter names and their values are separated by spaces on the command line.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Actually, a better change as opposed to quoting or escaping whitespace would be to use less a less fallible API like execFileSync instead of execSync (or async variants)
Thanks, it’s a bug, we should escape the space in the return of this function https://github.com/Azure/openapi-diff/blob/3e91e3a4bd10b2c865ab5fe83e1c0fd008004935/src/lib/validators/openApiDiff.ts#L149