A coworker attempted to nitro share, but had yet to install ngrok. He installed it via homebrew, which automatically gave him 3.x, and when he tried to share it would give this error:
unknown shorthand flag: 'o' in -ost-header=<site-name>
When looking in to this, I noted my ngrok version was 2.3.x and works flawlessly, so I dug in to the upgrade changes seen here:
https://ngrok.com/docs/guides/upgrade-v2-v3 and noted:
"The ngrok agent only accepts long name flags prefixed with -- and will error if a single hyphen is used. When updating your scripts, ensure things like --hostname and --host-header are using double hyphens."
I found the script in the repo /command/share/share.go line 170 uses the single hyphen.
Tested on my local with two hyphens, the command still works in ngrok v2, so I would recommend simply switching it out for 2 hyphens to be compatible with v2+v3
Description
A coworker attempted to
nitro share
, but had yet to install ngrok. He installed it via homebrew, which automatically gave him3.x
, and when he tried to share it would give this error:When looking in to this, I noted my ngrok version was
2.3.x
and works flawlessly, so I dug in to the upgrade changes seen here: https://ngrok.com/docs/guides/upgrade-v2-v3 and noted:"The ngrok agent only accepts long name flags prefixed with -- and will error if a single hyphen is used. When updating your scripts, ensure things like --hostname and --host-header are using double hyphens."
I found the script in the repo
/command/share/share.go
line 170 uses the single hyphen.Tested on my local with two hyphens, the command still works in ngrok v2, so I would recommend simply switching it out for 2 hyphens to be compatible with v2+v3
Steps to reproduce
Nitro Share
Additional info