Skip to content
This repository was archived by the owner on Jun 13, 2019. It is now read-only.

Commit 2101e86

Browse files
committed
Properly test if the project is in git already
1 parent b883c88 commit 2101e86

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/mix_docker.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ defmodule MixDocker do
6363
end
6464

6565
defp git_head_sha do
66-
with true <- File.regular?(".git"),
66+
with true <- File.exists?(".git"),
6767
{sha, 0} <- System.cmd("git", ["rev-parse", "HEAD"]) do
6868
String.slice(sha, 0, 10)
6969
else
@@ -72,7 +72,7 @@ defmodule MixDocker do
7272
end
7373

7474
defp git_commit_count do
75-
with true <- File.regular?(".git"),
75+
with true <- File.exists?(".git"),
7676
{count, 0} <- System.cmd("git", ["rev-list", "--count", "HEAD"]) do
7777
String.trim(count)
7878
else

0 commit comments

Comments
 (0)