File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -40,20 +40,14 @@ func newSSHCmd(app *App) *cobra.Command {
4040 Use : "ssh [<flags>...] [-- <ssh-flags>...] [<command>]" ,
4141 Short : "SSH into a codespace" ,
4242 PreRunE : func (c * cobra.Command , args []string ) error {
43- f := c .Flags ()
44- codespaceFlag := f .Lookup ("codespace" )
45- portFlag := f .Lookup ("server-port" )
46- profileFlag := f .Lookup ("profile" )
47- stdioFlag := f .Lookup ("stdio" )
48-
49- if stdioFlag .Changed {
50- if ! codespaceFlag .Changed {
43+ if opts .stdio {
44+ if opts .codespace == "" {
5145 return errors .New ("`--stdio` requires explicit `--codespace`" )
5246 }
53- if portFlag . Changed {
47+ if opts . serverPort != 0 {
5448 return errors .New ("cannot use `--stdio` with `--server-port`" )
5549 }
56- if profileFlag . Changed {
50+ if opts . profile != "" {
5751 return errors .New ("cannot use `--stdio` with `--profile`" )
5852 }
5953 }
You can’t perform that action at this time.
0 commit comments