fly-apps / dockerfile-rails

Provides a Rails generator to produce Dockerfiles and related files.
MIT License
455 stars 38 forks source link

Ensure that binfiles are files (not directories) #68

Closed gabebw closed 6 months ago

gabebw commented 7 months ago

When there is a directory inside a Rails app's bin/ (e.g. bin/stubs/), it will print this after running rails g dockerfile:

file_clash  Dockerfile
...[rest of output removed]...

The file_clash is an odd error, but the root cause is trying to call file-related methods on a directory (e.g. IO.read(directory)).

Now we filter the entries to only deal with actual files.

(Unfortunately I couldn't figure out where to write tests for this. In addition, I had some trouble running the tests successfully.)