Skip to content

tool executables with spaces cannnot be quoted on windows #1111

@alexsconway

Description

@alexsconway

In my project.yaml I have

:tools:
  :test_compiler:
    :executable: C:\Program Files\Microchip\xc8\v2.46\bin\xc8-cc.exe
    :name: 'Microchip XC8 compiler'

this used to work fine in ceedling 0.31.1.
In ceedling 1.01 (ruby3.4, windows 11) I get this error:
ERROR: :tools >> :test_compiler >> :executable => C:/Program does not exist on disk

I looked thru the breaking changes and found I shoudl be escape quoting it, so I tried that:
:executable: \"C:\Program Files\Microchip\xc8\v2.46\bin\xc8-cc.exe\"
resulting in:
ERROR: :tools >> :test_compiler >> :executable => /"C:/Program does not exist on disk

other attempts...
:executable: \"C:\\Program Files\\Microchip\\xc8\\v2.46\\bin\\xc8-cc.exe\"
ERROR: :tools >> :test_compiler >> :executable => /"C://Program does not exist on disk

:executable: \"C:/Program Files/Microchip/xc8/v2.46/bin/xc8-cc.exe\"
ERROR: :tools >> :test_compiler >> :executable => /"C:/Program does not exist on disk

I then created a dummy compiler in the local directory called "Stupid Compiler.exe"
(btw, "Code Cruncher" is not a good example because "Code" invokes VScode!)
:executable: \"Stupid Compiler.exe\"
ERROR: :tools >> :test_compiler >> :executable => /"Stupid does not exist on disk

It looks like all slashes are being coverted to forward slashes, including all backslash-escapes

Only workaround I have atm is to add the Microchip compiler to %PATH%
Thanks
Alex

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