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

GIT_DISCOVERY_ACROSS_FILESYSTEM not set #144

Open
syui opened this issue Apr 1, 2019 · 9 comments
Open

GIT_DISCOVERY_ACROSS_FILESYSTEM not set #144

syui opened this issue Apr 1, 2019 · 9 comments

Comments

@syui
Copy link

syui commented Apr 1, 2019

src : https://git.pleroma.social/pleroma/pleroma

remote:        * Stack heroku-18
remote:        * Erlang 21.2
remote:        * Elixir 1.7
$ cat elixir_buildpack.config
erlang_version=21.2
elixir_version=1.7
always_rebuild=false
runtime_path=/app

$ git push heroku master
remote: -----> Fetching app dependencies with mix
remote: fatal: not a git repository (or any parent up to mount point /)
remote: Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

$GIT_DIR is empty, $git_dir_value is also empty.

There is no .git directory in $build_path.

lib/app_funcs.sh

# https://github.com/HashNuke/heroku-buildpack-elixir/blob/master/lib/app_funcs.sh#L71
function app_dependencies() {
  # Unset this var so that if the parent dir is a git repo, it isn't detected
  # And all git operations are performed on the respective repos
  local git_dir_value=$GIT_DIR
  unset GIT_DIR

  cd $build_path
  output_section "Fetching app dependencies with mix"
  mix deps.get --only $MIX_ENV || exit 1

  export GIT_DIR=$git_dir_value
  cd - > /dev/null
}
@syui syui changed the title GIT_DISCOVERY_ACROSS_FILESYSTEM GIT_DISCOVERY_ACROSS_FILESYSTEM not set Apr 1, 2019
@syui
Copy link
Author

syui commented Apr 1, 2019

It seems that the mix command is not working.

$ pwd
/tmp/build_xxxxxxxxxxxxx
$ which mix
/tmp/build_xxxxxxxxxxxxx/.platform_tools/elixir/bin/mix
$ mix deps.get --only $MIX_ENV || exit 1
fatal: not a git repository (or any of the parent directories): .git

@syui
Copy link
Author

syui commented Apr 2, 2019

Can not execute mix on ${build_path} .

@syui
Copy link
Author

syui commented Apr 2, 2019

It can be run with ${build_pack_path} .

@HashNuke
Copy link
Owner

@syui Is everything alright with your build now or are you still stuck with this issue?

@syui
Copy link
Author

syui commented Apr 28, 2019

There is still the same problem.

Can not execute mix from $ {build_path}.

It moves when it does in this way.

https://github.com/syui/heroku-buildpack-elixir/blob/master/lib/app_funcs.sh

@lvm
Copy link

lvm commented Jul 14, 2019

I tried using @syui fork and was able to sort this issue, a PR for this would be fantastic

@syui
Copy link
Author

syui commented Jul 15, 2019

Certainly the problem can be solved, But I don't really know a lot about that.

@HashNuke
Copy link
Owner

If any of you can contribute a PR and test it out, I would be happy to merge it in.

@lvm
Copy link

lvm commented Jul 15, 2019

I'd be glad but to be honest, I got this issue when trying to deploy Pleroma on Heroku (same as @syui) and then found @syui's fork. At best, I can only assert this fix worked for me.

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

No branches or pull requests

3 participants