alfredbaudisch / pardall_markdown

Reactive publishing framework, filesystem-based with support for Markdown, nested hierarchies, and instant content rebuilding. Written in Elixir.
Apache License 2.0
115 stars 7 forks source link

Application with remote_repository_url -> delete content folder while the application is running -> repo is pulled again, but FileWatcher stops watching #50

Open alfredbaudisch opened 2 years ago

alfredbaudisch commented 2 years ago

This is a very low priority corner case, because the root_path folder is not supposed to be deleted at runtime anyway.

Also, probably just under Windows.

How to Reproduce

Report

iex(1)> 09:32:29.425 [info][mfa=PardallMarkdown.RepositoryProviders.Git.fetch/1 ] Fetching data from https://github.com/alfredbaudisch/pardall_markdown_sample_content
iex(1)> 09:32:29.432 [error][mfa=:gen_server.error_info/7 ] GenServer #PID<0.297.0> terminating
** (stop) :eacces
    erlang.erl:4412: :erlang.open_port({:spawn_executable, 'c:/Program Files/Git/mingw64/bin/git.exe'}, [{:cd, "p:/Dev/webdev/elixir/projects/pardall_markdown/sample_content"}, :stderr_to_stdout, :use_stdio, :exit_status, :binary, :hide, {:args, ["fetch"]}])
    (elixir 1.12.2) lib/system.ex:1052: System.do_cmd/3
    (git_cli 0.3.0) lib/git.ex:105: Git.execute_command/4
    (pardall_markdown 0.4.0) lib/pardall_markdown/repository_providers/git.ex:43: PardallMarkdown.RepositoryProviders.Git.fetch/1
    (pardall_markdown 0.4.0) lib/repository_watcher.ex:30: PardallMarkdown.RepositoryWatcher.handle_info/2
    (stdlib 3.15) gen_server.erl:695: :gen_server.try_dispatch/4
    (stdlib 3.15) gen_server.erl:771: :gen_server.handle_msg/6
    (stdlib 3.15) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message: :check_pending_remote_events
State: %PardallMarkdown.RepositoryProvider{provider: [provider: "https://github.com/alfredbaudisch/pardall_markdown_sample_content"], repo: %Git.Repository{path: "p:/Dev/webdev/elixir/projects/pardall_markdown/sample_content"}}
iex(1)> 09:32:30.313 [info][mfa=PardallMarkdown.RepositoryProviders.Git.git_repository/0 ] Cloning repository https://github.com/alfredbaudisch/pardall_markdown_sample_content, into ./sample_content
iex(1)> 09:32:30.836 [info][mfa=PardallMarkdown.RepositoryProviders.Git.repository/0 ] Pulling from git repository Already up to date.