Skip to content

Commit a219933

Browse files
committed
Allow .git to not be a directory
1 parent e4a0332 commit a219933

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

commands/add

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ KIND="${1%/}"
77
URL="$2"
88
BRANCH="$3"
99

10-
if [ $# -ne 3 ] || [ ! -d .git ] || [[ ! "$KIND" =~ ^(requires|equipment)$ ]]; then
10+
if [ $# -ne 3 ] || [ ! -e .git ] || [[ ! "$KIND" =~ ^(requires|equipment)$ ]]; then
1111
CMD="${0##*/}"
1212
cat << EOF
1313
Usage: $CMD [requires|equipment] url branch

commands/format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# shellcheck source=.settings
44
. "${BASH_SOURCE%/*}/.settings"
55

6-
if [ $# -ne 0 ] || [ ! -d .git ]; then
6+
if [ $# -ne 0 ] || [ ! -e .git ]; then
77
CMD="${0##*/}"
88
cat << EOF
99
Usage: $CMD

0 commit comments

Comments
 (0)