masutaka/circleci-bundle-update-pr

ArgumentError when CIRCLE_WORKING_DIRECTORY is relative path

nerixim opened this issue · 3 comments

@masutaka
Thanks for merging #101

I ran into the following error on update. Currently I'm avoiding it by passing absolute path but I guess it would better be fixed.
Going to work on it tonight.

ArgumentError: different prefix: "/" and "~/app"

We get something similar now since yesterday. It says bundle installed but then still fails, without a clue how to fix it, or what is going wrong:

Bundle updated!
Traceback (most recent call last):
	6: from /app/heroku/ruby/bundle/ruby/2.6.4/bin/circleci-bundle-update-pr:23:in `<main>'
	5: from /app/heroku/ruby/bundle/ruby/2.6.4/bin/circleci-bundle-update-pr:23:in `load'
	4: from /app/heroku/ruby/bundle/ruby/2.6.4/gems/circleci-bundle-update-pr-1.18.0/bin/circleci-bundle-update-pr:15:in `<top (required)>'
	3: from /app/heroku/ruby/bundle/ruby/2.6.4/gems/circleci-bundle-update-pr-1.18.0/lib/circleci/bundle/update/pr.rb:32:in `create_if_needed'
	2: from /app/heroku/ruby/bundle/ruby/2.6.4/gems/circleci-bundle-update-pr-1.18.0/lib/circleci/bundle/update/pr.rb:120:in `create_branch'
	1: from /app/heroku/ruby/bundle/ruby/2.6.4/gems/circleci-bundle-update-pr-1.18.0/lib/circleci/bundle/update/pr.rb:249:in `lockfile_path'
/app/heroku/ruby/ruby-2.6.4/lib/ruby/2.6.0/pathname.rb:522:in `relative_path_from': different prefix: "/" and "~/project" (ArgumentError)

Exited with code exit status 1

I have yanked v1.18.0. I will think later.
https://rubygems.org/gems/circleci-bundle-update-pr/versions

@masutaka
Sorry about you having 1.18 yanked 🙏
I hope #105 gonna fix it?

Or maybe we also need some flag to use relative path explicitly?