Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

K fails on most command line options #520

Closed
desdesdes opened this issue Aug 11, 2014 · 4 comments
Closed

K fails on most command line options #520

desdesdes opened this issue Aug 11, 2014 · 4 comments
Assignees
Milestone

Comments

@desdesdes
Copy link

I am trying to convert some command line tools to the new kproj structure. Most of my command line tools accept options specified either with /, - or -- (last is more common for unix developers). I noticed that most command line option prefixes fail when using k run.

I build the following sample:

using System;

namespace ConsoleApp1
{
    public class Program
    {
        public static void Main(string[] args)
        {
            Console.WriteLine(string.Join("|", args));
            Console.ReadLine();
        }
    }
}

Tried the following options:

C:\Users\Administrator\Documents\Visual Studio 14\Projects\ConsoleApp1\ConsoleAp
p1>k run -a
TODO: Error: unrecognized flag '-a'

C:\Users\Administrator\Documents\Visual Studio 14\Projects\ConsoleApp1\ConsoleAp
p1>k run -aa
TODO: Error: unrecognized flag '-aa'

C:\Users\Administrator\Documents\Visual Studio 14\Projects\ConsoleApp1\ConsoleAp
p1>k run /a
/a
@davidfowl
Copy link
Member

/cc @ChengTian are we aggressively parsing arguments that K doesn't need to consume?

@ChengTian
Copy link
Contributor

@davidfowl , just reproduced this problem, checked code and confirmed that we do aggressively parse options that K shouldn't consume. It's a bug of command-line parser.

@desdesdes , thanks for reporting this bug. It will be fixed soon.

@davidfowl
Copy link
Member

This also feels like a dupe of #479

@ChengTian
Copy link
Contributor

Yes, I confirmed that #479 is a dupe.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants