fix: use correct method to detect if a repo is empty

This commit is contained in:
Jose Diaz-Gonzalez committed 2021-01-17 17:00:33 -05:00
1 parent 87a786fec5
commit 5e645e1489
1 file changed
+1 -1
+1 -1
View File
@@ -193,7 +193,7 @@ fn-git-clone() {
local APP_ROOT="$DOKKU_ROOT/$APP" local APP_ROOT="$DOKKU_ROOT/$APP"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on" [[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
if [[ -d "$DOKKU_ROOT/$APP/refs" ]]; then if [[ "$(git -C "$APP_ROOT" count-objects)" != "0 objects, 0 kilobytes" ]]; then
dokku_log_fail "The clone subcommand can only be executed for new applications" dokku_log_fail "The clone subcommand can only be executed for new applications"
fi fi