fix(offload): add pre-sync connectivity check to trigger SSO prompts

This commit is contained in:
mkorwel
2026-03-15 23:49:10 -07:00
parent 6d81c5ece1
commit 959bb5dc9b

View File

@@ -99,6 +99,15 @@ Host ${sshAlias}
const persistentScripts = `/home/node/.offload/scripts`;
console.log(`\n📦 Performing One-Time Synchronization...`);
// Trigger any SSH/SSO prompts before bulk sync
console.log(' - Verifying connection and triggering SSO...');
const connCheck = spawnSync(sshCmd, [remoteHost, 'echo 1'], { stdio: 'inherit', shell: true });
if (connCheck.status !== 0) {
console.error('\n❌ SSH connection failed. Please ensure you have run "gcert" recently.');
return 1;
}
// Ensure host directories exist (on the VM Host)
spawnSync(sshCmd, [remoteHost, `mkdir -p /home/node/dev/main /home/node/.gemini/policies /home/node/.offload/scripts`], { shell: true });