mirror of
https://github.com/aclist/dztui.git
synced 2026-11-17 07:11:55 +01:00
This commit is contained in:
1 parent
d47d7075e9
commit
dfef2cfd75
1 file changed
+2
-4
@@ -3,11 +3,9 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
cmd = ["git", "ls-files", "--others", "--exclude-standard"]
|
cmd = ["git", "ls-files", "--others", "--exclude-standard"]
|
||||||
result = subprocess.run(
|
result = subprocess.run(cmd, capture_output=True, text=True)
|
||||||
cmd, capture_output=True, text=True
|
|
||||||
)
|
|
||||||
untracked = [os.path.basename(line.rstrip()) for line in result.stdout.splitlines()]
|
untracked = [os.path.basename(line.rstrip()) for line in result.stdout.splitlines()]
|
||||||
if bool(untracked):
|
if bool(untracked):
|
||||||
print(f"The following files are untracked. Add to .gitignore if this is intended.")
|
print("The following files are untracked. Add to .gitignore if this is intended.")
|
||||||
print("\n".join(untracked))
|
print("\n".join(untracked))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
Reference in new issue
Block a user