slackhive 0.1.34 → 0.1.35
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/dist/commands/init.js +11 -0
- package/package.json +1 -1
package/dist/commands/init.js
CHANGED
|
@@ -70,6 +70,17 @@ function extractOAuthCredentials() {
|
|
|
70
70
|
return result;
|
|
71
71
|
}
|
|
72
72
|
catch { /* not available */ }
|
|
73
|
+
// Fallback: read credentials file directly (headless Linux / no keyring)
|
|
74
|
+
try {
|
|
75
|
+
const credPath = (0, path_1.join)(process.env.HOME || '~', '.claude', '.credentials.json');
|
|
76
|
+
if ((0, fs_1.existsSync)(credPath)) {
|
|
77
|
+
const creds = (0, fs_1.readFileSync)(credPath, 'utf-8').trim();
|
|
78
|
+
const result = parseOAuthFromJson(creds);
|
|
79
|
+
if (result)
|
|
80
|
+
return result;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
catch { /* file not readable or invalid */ }
|
|
73
84
|
return null;
|
|
74
85
|
}
|
|
75
86
|
/**
|