fix(pipeline): resolve SafeToAutoRun deadlock and sync freezing (v0.5.20) (#589)

This commit is contained in:
Variet Worker
2026-04-08 07:28:48 +09:00
parent 13f13ee243
commit 2eb1fbb6b7
16 changed files with 821 additions and 61 deletions

View File

@@ -105,12 +105,13 @@ function detectProjectName() {
if (folders && folders.length > 0) {
const cwd = folders[0].uri.fsPath;
try {
const remoteUrl = cp.execSync('git remote get-url origin', {
cwd, encoding: 'utf-8', timeout: 2000, windowsHide: true, stdio: ['ignore', 'pipe', 'ignore']
}).toString().trim();
const match = remoteUrl.match(/\/([^\/]+?)(?:\.git)?$/);
if (match && match[1]) {
return match[1].toLowerCase().replace(/[\s\-]+/g, '_');
const gitConfigPath = path.join(cwd, '.git', 'config');
if (fs.existsSync(gitConfigPath)) {
const configContent = fs.readFileSync(gitConfigPath, 'utf8');
const match = configContent.match(/url\s*=\s*.*\/([^\/]+?)(?:\.git)?$/m);
if (match && match[1]) {
return match[1].toLowerCase().replace(/[\s\-]+/g, '_');
}
}
}
catch { }