rake-compiler / rake-compiler-dock

Easy to use and reliable cross compiler environment for building Windows, Linux, Mac and JRuby binary gems.
MIT License
77 stars 30 forks source link

Rescue Etc.getgrgid so that the fallback code path is possible #14

Closed sodabrew closed 8 years ago

sodabrew commented 8 years ago

There's a fallback code path if the group name cannot be found, but it can't run if Etc.getgrgid raises an exception, e.g. ArgumentError: can't find group for 285

      def current_group
        group_obj = Etc.getgrgid
        make_valid_group_name(group_obj ? group_obj.name : "dummygroup")
      end
larskanis commented 8 years ago

On which operating system does getgrpid raise an exception?

sodabrew commented 8 years ago

On OS X if the group doesn't have a name set, (maybe because it's a NetInfo group?)

larskanis commented 8 years ago

Thank you @sodabrew ! I just released rake-compiler-dock-0.5.2 with your change.