You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/gitpod-cli/cmd/ports-expose.go
+17-4Lines changed: 17 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,8 @@ import (
20
20
21
21
varrewriteHostHeaderbool
22
22
23
-
varportFwdCmd=&cobra.Command{
24
-
Use: "forward-port <local-port> [target-port]",
23
+
varportExposeCmd=&cobra.Command{
24
+
Use: "expose <local-port> [target-port]",
25
25
Short: "Makes a port available on 0.0.0.0 so that it can be exposed to the internet",
26
26
Long: ``,
27
27
Args: cobra.RangeArgs(1, 2),
@@ -71,7 +71,20 @@ var portFwdCmd = &cobra.Command{
71
71
},
72
72
}
73
73
74
+
varportExposeCmdAlias=&cobra.Command{
75
+
Hidden: true,
76
+
Deprecated: "please use `ports expose` instead.",
77
+
Use: "forward-port <local-port> [target-port]",
78
+
Short: portExposeCmd.Short,
79
+
Long: portExposeCmd.Long,
80
+
Args: portExposeCmd.Args,
81
+
Run: portExposeCmd.Run,
82
+
}
83
+
74
84
funcinit() {
75
-
rootCmd.AddCommand(portFwdCmd)
76
-
portFwdCmd.Flags().BoolVarP(&rewriteHostHeader, "rewrite-host-header", "r", false, "rewrites the host header of passing HTTP requests to localhost")
85
+
portsCmd.AddCommand(portExposeCmd)
86
+
portExposeCmd.Flags().BoolVarP(&rewriteHostHeader, "rewrite-host-header", "r", false, "rewrites the host header of passing HTTP requests to localhost")
87
+
88
+
rootCmd.AddCommand(portExposeCmdAlias)
89
+
portExposeCmdAlias.Flags().BoolVarP(&rewriteHostHeader, "rewrite-host-header", "r", false, "rewrites the host header of passing HTTP requests to localhost")
0 commit comments