gitarsenal-cli 1.9.23 → 1.9.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/python/shell.py
CHANGED
|
@@ -5,6 +5,23 @@ import time
|
|
|
5
5
|
import uuid
|
|
6
6
|
import re
|
|
7
7
|
|
|
8
|
+
def get_stored_credentials():
|
|
9
|
+
"""Load stored credentials from ~/.gitarsenal/credentials.json"""
|
|
10
|
+
import json
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
|
|
13
|
+
try:
|
|
14
|
+
credentials_file = Path.home() / ".gitarsenal" / "credentials.json"
|
|
15
|
+
if credentials_file.exists():
|
|
16
|
+
with open(credentials_file, 'r') as f:
|
|
17
|
+
credentials = json.load(f)
|
|
18
|
+
return credentials
|
|
19
|
+
else:
|
|
20
|
+
return {}
|
|
21
|
+
except Exception as e:
|
|
22
|
+
print(f"⚠️ Error loading stored credentials: {e}")
|
|
23
|
+
return {}
|
|
24
|
+
|
|
8
25
|
class PersistentShell:
|
|
9
26
|
"""A persistent bash shell using subprocess.Popen for executing commands with state persistence."""
|
|
10
27
|
|