browser icon indicating copy to clipboard operation
browser copied to clipboard

Add explicit commands to binary

Open karlseguin opened this issue 9 months ago • 2 comments

Changes are fairly superfluous. I wanted to remove the error.NoError, but then thought having more explicit command -> options might be good (especially if we add more command and/or options).

I also dupe the string arguments (i.e. host). While not duping them is safe on linux/darwin, it isn't clear to me from the documentation that this is guaranteed.

karlseguin avatar Feb 21 '25 09:02 karlseguin

@karlseguin thanks for the PR :pray: I think we should update some files accordingly:

  • README.md https://github.com/lightpanda-io/browser/blob/main/README.md?plain=1#L64 and https://github.com/lightpanda-io/browser/blob/main/README.md?plain=1#L76
  • Dockerfile https://github.com/lightpanda-io/browser/blob/main/Dockerfile#L79

Since we have already some users, I would like to keep a backward compatbility (with a warning log displayed maybe?) ie:

  • if nothing is passed, ie ./lightpanda consider a serve
  • if no command is sent but a --dump option is passed, ie ./ligthpanda --dump, consider a fetch
  • if no command is sent but another option is passed, ie ./lightpanda --host, consider a serve

krichprollsch avatar Feb 21 '25 17:02 krichprollsch

I think we can have this backward compat mode until we tag a next release.

krichprollsch avatar Feb 21 '25 17:02 krichprollsch