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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fpm crashes with an exception if a given --workdir path doesn't exist #1938

Closed
jordansissel opened this issue Oct 16, 2022 · 0 comments · Fixed by #1959
Closed

fpm crashes with an exception if a given --workdir path doesn't exist #1938

jordansissel opened this issue Oct 16, 2022 · 0 comments · Fixed by #1959

Comments

@jordansissel
Copy link
Owner

When using the --workdir option, fpm should report an useful and actionable error message if the given path doesn't exist.

Testing with v1.14.2, if the path doesn't exist, fpm throws an exception as follows:

% fpm --workdir /tmp/path/not/exists -s empty -t deb -n example
/home/jls/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/stud-0.0.23/lib/stud/temporary.rb:47:in `mkdir': No such file or directory @ dir_s_mkdir - /tmp/path/not/exists/package-empty-build-4b0a05ad8df374a508e46dcb1bfa4d3ab2d966aad5a35de70024a7938234 (Errno::ENOENT)
        from /home/jls/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/stud-0.0.23/lib/stud/temporary.rb:47:in `directory'
        from /home/jls/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/fpm-1.14.2/lib/fpm/package.rb:267:in `build_path'
        from /home/jls/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/fpm-1.14.2/lib/fpm/package.rb:182:in `initialize'
        from /home/jls/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/fpm-1.14.2/lib/fpm/package/empty.rb:8:in `initialize'
        from /home/jls/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/fpm-1.14.2/lib/fpm/command.rb:309:in `new'
        from /home/jls/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/fpm-1.14.2/lib/fpm/command.rb:309:in `execute'
        from /home/jls/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/clamp-1.0.1/lib/clamp/command.rb:68:in `run'
        from /home/jls/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/fpm-1.14.2/lib/fpm/command.rb:574:in `run'
        from /home/jls/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/clamp-1.0.1/lib/clamp/command.rb:133:in `run'
        from /home/jls/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/fpm-1.14.2/bin/fpm:7:in `<top (required)>'
        from /home/jls/.rbenv/versions/3.1.0/bin/fpm:25:in `load'
        from /home/jls/.rbenv/versions/3.1.0/bin/fpm:25:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant