Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't check breakline if file is empty. #353

Open
wants to merge 1 commit into
base: master
from

Conversation

@ippachi
Copy link

ippachi commented Dec 1, 2019

Hey.
I use hanami-reloader but I got the below error messages.

undefined method `end_with?' for nil:NilClass
/Users/ippachi/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/hanami-utils-1.3.5/lib/hanami/utils/files.rb:166:in `append'
        /Users/ippachi/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/hanami-reloader-0.2.1/lib/hanami/reloader/cli.rb:16:in `call'
        /Users/ippachi/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/hanami-1.3.3/lib/hanami/cli/commands/command.rb:85:in `call'
        /Users/ippachi/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/hanami-cli-0.3.1/lib/hanami/cli.rb:57:in `call'
        /Users/ippachi/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/hanami-1.3.3/bin/hanami:6:in `<top (required)>'
        /Users/ippachi/.rbenv/versions/2.6.5/bin/hanami:23:in `load'
        /Users/ippachi/.rbenv/versions/2.6.5/bin/hanami:23:in `<top (required)>'
        /Users/ippachi/.rbenv/versions/2.6.5/lib/ruby/2.6.0/bundler/cli/exec.rb:74:in `load'
        /Users/ippachi/.rbenv/versions/2.6.5/lib/ruby/2.6.0/bundler/cli/exec.rb:74:in `kernel_load'
        /Users/ippachi/.rbenv/versions/2.6.5/lib/ruby/2.6.0/bundler/cli/exec.rb:28:in `run'
        /Users/ippachi/.rbenv/versions/2.6.5/lib/ruby/2.6.0/bundler/cli.rb:463:in `exec'
        /Users/ippachi/.rbenv/versions/2.6.5/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        /Users/ippachi/.rbenv/versions/2.6.5/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
        /Users/ippachi/.rbenv/versions/2.6.5/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
        /Users/ippachi/.rbenv/versions/2.6.5/lib/ruby/2.6.0/bundler/cli.rb:27:in `dispatch'
        /Users/ippachi/.rbenv/versions/2.6.5/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
        /Users/ippachi/.rbenv/versions/2.6.5/lib/ruby/2.6.0/bundler/cli.rb:18:in `start'
        /Users/ippachi/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/bundle:30:in `block in <top (required)>'
        /Users/ippachi/.rbenv/versions/2.6.5/lib/ruby/2.6.0/bundler/friendly_errors.rb:124:in `with_friendly_errors'
        /Users/ippachi/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/bundle:22:in `<top (required)>'
        /Users/ippachi/.rbenv/versions/2.6.5/bin/bundle:23:in `load'
        /Users/ippachi/.rbenv/versions/2.6.5/bin/bundle:23:in `<main>'

This exception is caused that Utils::Files.append doesn't support empty file.
So fix it.
Thanks! 馃槃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can鈥檛 perform that action at this time.