> On March 28, 2014, 1:04 a.m., Niklas Nielsen wrote:
> > src/cli/mesos.cpp, line 61
> > <https://reviews.apache.org/r/19180/diff/2/?file=519554#file519554line61>
> >
> >     How about moving this block to a helper we call once? For instance: 
> >     
> >     static Try<Nothing> result = addPath(argv[0]);
> >     
> >     Or else, just rename firstThrough. It doesn't capture much context on 
> > the problem it solves; How about pathAdded and initialize with false?

Why I think firstThrough is much readable than pathAdded because we only *try 
to add* it to $PATH at first through, regardless whether it was added or not.

However, pathAdded means, if it didn't been added in first through, pathAdded 
should be false, then we'll try again. That's not what I want, because nothing 
changed after first through, so the later tries just fail again and again.


- Chengwei


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/19180/#review38756
-----------------------------------------------------------


On March 26, 2014, 9:32 a.m., Chengwei Yang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19180/
> -----------------------------------------------------------
> 
> (Updated March 26, 2014, 9:32 a.m.)
> 
> 
> Review request for mesos, Adam B, Ben Mahler, Niklas Nielsen, and Vinod Kone.
> 
> 
> Bugs: MESOS-1093
>     https://issues.apache.org/jira/browse/MESOS-1093
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> cli: only add local bin direcotry to PATH at first through
> 
> Without this patch, "mesos help --help" will output below
> 
> Not expecting '--help' before command
> Usage: mesos <command> [OPTIONS]
> 
> Available commands:
> help
> resolve
> cat
> scp
> log
> tail
> execute
> ps
> local
> resolve
> cat
> scp
> log
> tail
> execute
> ps
> local
> 
> Apparently all available commands printed twice, the "mesos help help"
> will print available commands 3 times.
> 
> Review: https://reviews.apache.org/r/19180
> 
> 
> Diffs
> -----
> 
>   src/cli/mesos.cpp 171a707cd2ba2348898e7fbe8fe9f0634edd6d86 
> 
> Diff: https://reviews.apache.org/r/19180/diff/
> 
> 
> Testing
> -------
> 
> done?
> 
> 
> Thanks,
> 
> Chengwei Yang
> 
>

Reply via email to