Skip to content

Commit

Permalink
cmd/action: change defualt listen address to work on all cases (#627)
Browse files Browse the repository at this point in the history
* cmd/action: change defualt listen address to work on all cases

* gen
  • Loading branch information
zeevmoney authored Mar 6, 2022
1 parent f15952f commit 0f0035b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
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

0 comments on commit 0f0035b

Please sign in to comment.