We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a0f6468 + c99e5e6 commit c7aafd4Copy full SHA for c7aafd4
cmd/ssh.go
@@ -37,6 +37,12 @@ func (c *SshCommand) Run(args []string) int {
37
return 1
38
}
39
40
+ if err := c.flags.Parse(args); err != nil {
41
+ return 1
42
+ }
43
+
44
+ args = c.flags.Args()
45
46
commandArgumentValidator := &CommandArgumentValidator{required: 1, optional: 1}
47
commandArgumentErr := commandArgumentValidator.validate(args)
48
if commandArgumentErr != nil {
cmd/ssh_test.go
@@ -107,6 +107,12 @@ func TestSshRun(t *testing.T) {
107
"ssh vagrant@example.test",
108
0,
109
},
110
+ {
111
+ "production_with_user_flag",
112
+ []string{"-u=web", "production"},
113
+ "ssh web@example.com",
114
+ 0,
115
+ },
116
117
118
for _, tc := range cases {
0 commit comments