ethack / docker-vpn

Conveniently connect to Cisco AnyConnect or OpenVPN endpoints using a docker container
96 stars 29 forks source link

Adding quotes around $@ #13

Closed giovannipizzi closed 2 years ago

giovannipizzi commented 2 years ago

These are needed in bash to expand the array $@ correctly, where quotes spaces are not used to break.

For instance, if you pass --a="b c", "$@" will correctly consider --a="b c" as an argument, while $@ will split it as --a=b and c, incorrectly.

This was e.g. required in my usecase, because I need to specify --authgroup='XXX YYY' where the string XXX YYY is decided by the server and contains spaces.

ethack commented 2 years ago

Thanks!