Skip to content

New CLI attach IPC.#361

Merged
0xsharma merged 3 commits into
v0.3.0-devfrom
shivam/newCli-IPC
Apr 20, 2022
Merged

New CLI attach IPC.#361
0xsharma merged 3 commits into
v0.3.0-devfrom
shivam/newCli-IPC

Conversation

@0xsharma

@0xsharma 0xsharma commented Mar 22, 2022

Copy link
Copy Markdown
Member

Refactored bor attach command. bor attach <IPC file> is used to connect to remote console. It also includes flags such as --jspath , --preload , --exec .

@0xsharma 0xsharma changed the base branch from master to v0.3.0-dev March 22, 2022 10:51
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (v0.3.0-dev@cb489f8). Click here to learn what that means.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             v0.3.0-dev     #361   +/-   ##
=============================================
  Coverage              ?   57.05%           
=============================================
  Files                 ?      558           
  Lines                 ?    66403           
  Branches              ?        0           
=============================================
  Hits                  ?    37885           
  Misses                ?    25313           
  Partials              ?     3205           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cb489f8...661115e. Read the comment docs.

Comment thread internal/cli/attach.go Outdated
if len(args) == 0 {
args = append(args, "")
}
if args[0] != "" && string(args[0][0:2]) == "--" {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if args[0] != "" && string(args[0][0:2]) == "--" {
if args[0] != "" && strings.HasPrefix(args, "--") {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you use "--"? Can you add a description to the PR on how to use the command?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you apply this https://github.com/maticnetwork/bor/pull/361/files#r832158323? Otherwise, it might panic if the size of the args is less than 2.

Comment thread internal/cli/attach.go
Comment thread internal/cli/attach.go Outdated
Comment thread internal/cli/server/command_flags.go Outdated
Comment thread internal/cli/server/console.go Outdated
Comment thread internal/cli/server/console.go Outdated
@0xsharma 0xsharma requested a review from ferranbt March 23, 2022 11:20
@0xsharma 0xsharma changed the title New CLI console + attach IPC. New CLI attach IPC. Mar 24, 2022
Comment thread internal/cli/attach.go Outdated
Comment thread internal/cli/attach.go Outdated
if len(args) == 0 {
args = append(args, "")
}
if args[0] != "" && string(args[0][0:2]) == "--" {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you apply this https://github.com/maticnetwork/bor/pull/361/files#r832158323? Otherwise, it might panic if the size of the args is less than 2.

@0xsharma 0xsharma merged commit 20580f8 into v0.3.0-dev Apr 20, 2022
@temaniarpit27 temaniarpit27 deleted the shivam/newCli-IPC branch June 8, 2022 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants