sstephenson / bats

Bash Automated Testing System
MIT License
7.12k stars 517 forks source link

Avoiding double slash when setting the target installation path #131

Open fearenales opened 9 years ago

fearenales commented 9 years ago

When installing bats in my local env, I used /usr/local/ as argument for install.sh. The generated path for bats installation was /usr/local//bin/bats.

I've just added a very simple logic in install.sh script to avoid this double slash, supporting both with and without trailing slash in the specified path.

ztombol commented 8 years ago

Multiple slashes should not matter. Did you run into any problems?

RomanSaveljev commented 8 years ago

@ztombol It would not hurt having a cleaner implementation either

fearenales commented 8 years ago

@ztombol bats is installed with no problems. The only issue is the prompted message:

Installed Bats to /usr/local//bin/bats

As @RomanSaveljev said, this is more about a cleaner implementation and a more polished output.

ztombol commented 8 years ago

Oops! I missed that the path is echoed back to the user. Good job! :+1: