Skip to content

Command line parameters must begin with '/' #448

Description

@xoorath

Hello,

On Linux the command line argument handling doesn't allow for quote wrapped arguments.

This causes issues when quotes are needed for paths with spaces. For example, the following argument is rejected:

"/sources('/a/b/c', '/a/b/d)"

The double-quotes are needed in this case for the entire sources argument to be interpreted as a single argument.

A similar harder-to-avoid issue is if there's a space in the path like so:

"/sources('/a/s p a c e/c','/a/s p a c e/d)"

The actual error I'm encountering is:

Unhandled exception. Sharpmake.Error: Command line parameters must begin with '/'
	/outputDir('/home/xo/git/Shiver2/Dev/Temp/Sharpmake') "/sources('/home/xo/git/Shiver2/Dev/Sharpmake/CommonTarget.Sharpmake.cs', '/home/xo/git/Shiver2/Projects/ShiverSolution.Sharpmake.cs', '/home/xo/git/Shiver2/Projects/Apps/HelloWorld/HelloWorld.Sharpmake.cs')
	At offset 54

You'll notice that /outputDir(...) doesn't need quotes because there are no spaces, but /sources(...) does. I can work around this by removing the spaces between the elements passed to sources and then removing the double-quotes, but I believe there is still an issue regardless.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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