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

Remove IStartupInfoProvider in favor of Orc.CommandLine #1209

Open
GeertvanHorrik opened this Issue Jul 27, 2018 · 4 comments

Comments

Projects
None yet
1 participant
@GeertvanHorrik
Member

GeertvanHorrik commented Jul 27, 2018

This input:

-something 'some argument' -appcolor #FF483FFC -appname "New name" -project 'D:\Data\Testing\Clients\a\b\c d e'

Results into this output:

-something 'some argument' -appcolor #FF483FFC -appname "New name" -project "'D:\Data\Testing\Clients\a\b\c" d e'

It should respect the spaces and existing quotes. Maybe instead of adding the quotes, it should just ignore it.

@GeertvanHorrik GeertvanHorrik added the bug label Jul 27, 2018

@GeertvanHorrik GeertvanHorrik added this to the 5.7.0 milestone Jul 27, 2018

@GeertvanHorrik GeertvanHorrik self-assigned this Jul 27, 2018

@GeertvanHorrik

This comment has been minimized.

Member

GeertvanHorrik commented Jul 27, 2018

Part of the problem is that StartupInfoService splits by spaces too aggressively. But this is due to System.Environment.GetCommandLineArgs() which does this as well. (only supports " quotes, not ' quotes).

@GeertvanHorrik

This comment has been minimized.

Member

GeertvanHorrik commented Jul 27, 2018

The real fix is to use System.Environment.CommandLine, I think it's best to let the startup info provider return this instead of splitted arguments.

@GeertvanHorrik

This comment has been minimized.

Member

GeertvanHorrik commented Jul 27, 2018

Maybe we should mark this whole class obsolete in favor of Orc.CommandLine.

@GeertvanHorrik GeertvanHorrik changed the title from IStartupInfoProviderExtensions.GetCommandLine adds too many quotes to Remove IStartupInfoProvider in favor of Orc.CommandLine Jul 27, 2018

@GeertvanHorrik GeertvanHorrik modified the milestones: 5.7.0, 6.0.0 Jul 27, 2018

GeertvanHorrik added a commit that referenced this issue Jul 27, 2018

#1209 Mark IStartupInfoProvider as obsolete in favor of Orc.CommandLi…
…ne since that implementation takes better care of supporting different quote styles (e.g. allows ')
@stale

This comment has been minimized.

stale bot commented Sep 25, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 25, 2018

@GeertvanHorrik GeertvanHorrik added planned and removed wontfix labels Sep 29, 2018

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