Skip to content

Commit bca733d

Browse files
committed
Warn for shell expansion of DEFAULT_DESCRIBE.
1 parent ff8ed33 commit bca733d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/setuptools_scm/git.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
from .utils import trace
1414
from .version import meta
1515

16-
DEFAULT_DESCRIBE = "git describe --dirty --tags --long --match '*[0-9]*'"
16+
# If testing command in shell make sure to quote the match argument like
17+
# '*[0-9]*' as it will expand before being sent to git if there are any matching
18+
# files in current directory.
19+
DEFAULT_DESCRIBE = ["git", "describe", "--dirty", "--tags", "--long", "--match", "*[0-9]*"]
1720

1821

1922
class GitWorkdir(Workdir):

0 commit comments

Comments
 (0)