chef-cookbooks / runit

Development repository for the Chef Runit Cookbook
https://supermarket.chef.io/cookbooks/runit
Apache License 2.0
106 stars 197 forks source link

Use File.join to generate paths #240

Closed balasankarc closed 5 years ago

balasankarc commented 5 years ago

Description

Using "#{foo}/#{bar}" for generating paths is little error prone (for example, if someone makes a mistake and sets foo = '/var/log/; bar = 'service', the path becomes foo//bar due to the trailing slash). Even though technically not an error, this may cause test failures where foo/bar is explicitly tested.

Using ::File.join even though a bit of extra work, is safer.

Check List

balasankarc commented 5 years ago

@tas50 Could you take a look? From what I see, the CI failures are similar to what is seen in master, and are unrelated to this PR.

tas50 commented 5 years ago

Looks good now. We should have done this a long time ago. Thanks for taking the time to clean it all up.