Skip to content
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

cmd/action: change defualt listen address to work on all cases #627

Merged
merged 2 commits into from
Mar 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/action/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func init() {
ApplyCmd.Flags().BoolVarP(&ApplyFlags.DryRun, "dry-run", "", false, "Dry-run. Print SQL plan without prompting for execution.")
ApplyCmd.Flags().BoolVarP(&ApplyFlags.AutoApprove, "auto-approve", "", false, "Auto approve. Apply the schema changes without prompting for approval.")
ApplyCmd.Flags().BoolVarP(&ApplyFlags.Web, "web", "w", false, "Open in a local Atlas UI.")
ApplyCmd.Flags().StringVarP(&ApplyFlags.Addr, "addr", "", "127.0.0.1:5800", "used with -w, local address to bind the server to.")
ApplyCmd.Flags().StringVarP(&ApplyFlags.Addr, "addr", "", ":5800", "used with -w, local address to bind the server to.")
cobra.CheckErr(ApplyCmd.MarkFlagRequired("url"))
cobra.CheckErr(ApplyCmd.MarkFlagRequired("file"))
dsn2url(ApplyCmd, &ApplyFlags.URL)
Expand Down
3 changes: 2 additions & 1 deletion cmd/action/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"context"

"ariga.io/atlas/sql/schema"

"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -48,7 +49,7 @@ func init() {
schemaCmd.AddCommand(InspectCmd)
InspectCmd.Flags().StringVarP(&InspectFlags.URL, "url", "u", "", "[driver://username:password@protocol(address)/dbname?param=value] Select data source using the url format")
InspectCmd.Flags().BoolVarP(&InspectFlags.Web, "web", "w", false, "Open in a local Atlas UI")
InspectCmd.Flags().StringVarP(&InspectFlags.Addr, "addr", "", "127.0.0.1:5800", "Used with -w, local address to bind the server to")
InspectCmd.Flags().StringVarP(&InspectFlags.Addr, "addr", "", ":5800", "Used with -w, local address to bind the server to")
InspectCmd.Flags().StringSliceVarP(&InspectFlags.Schema, "schema", "s", nil, "Set schema name")
cobra.CheckErr(InspectCmd.MarkFlagRequired("url"))
dsn2url(InspectCmd, &InspectFlags.URL)
Expand Down
4 changes: 2 additions & 2 deletions doc/md/cli/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ migration.
--dry-run Dry-run. Print SQL plan without prompting for execution.
--auto-approve Auto approve. Apply the schema changes without prompting for approval.
-w, --web Open in a local Atlas UI.
--addr string used with -w, local address to bind the server to. (default "127.0.0.1:5800")
--addr string used with -w, local address to bind the server to. (default ":5800")

```

Expand Down Expand Up @@ -177,7 +177,7 @@ flag.
```
#### Flags
```
--addr string Used with -w, local address to bind the server to (default "127.0.0.1:5800")
--addr string Used with -w, local address to bind the server to (default ":5800")
-s, --schema strings Set schema name
-u, --url string [driver://username:password@protocol(address)/dbname?param=value] Select data source using the url format
-w, --web Open in a local Atlas UI
Expand Down