@misterhuydo/sentinel 1.4.16 → 1.4.17
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/lib/add.js +4 -1
- package/package.json +1 -1
package/lib/add.js
CHANGED
|
@@ -125,7 +125,10 @@ function fetchUrl(url) {
|
|
|
125
125
|
// ── SSH deploy key helpers ────────────────────────────────────────────────────
|
|
126
126
|
|
|
127
127
|
function ensureKnownHosts() {
|
|
128
|
-
const
|
|
128
|
+
const sshDir = path.join(os.homedir(), '.ssh');
|
|
129
|
+
const knownHosts = path.join(sshDir, 'known_hosts');
|
|
130
|
+
fs.ensureDirSync(sshDir);
|
|
131
|
+
try { fs.chmodSync(sshDir, 0o700); } catch (_) {}
|
|
129
132
|
const content = fs.existsSync(knownHosts) ? fs.readFileSync(knownHosts, 'utf8') : '';
|
|
130
133
|
if (content.includes('github.com')) return;
|
|
131
134
|
info('Adding GitHub to known_hosts…');
|