agents-anywhere 0.7.1 → 0.7.2
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/cli.js +11 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1371,9 +1371,17 @@ async function promptGitHubRepo(repoDir) {
|
|
|
1371
1371
|
{ stdio: "inherit", cwd: repoDir }
|
|
1372
1372
|
);
|
|
1373
1373
|
success(`Created and pushed to private GitHub repo: ${repoName}`);
|
|
1374
|
-
} catch
|
|
1375
|
-
|
|
1376
|
-
|
|
1374
|
+
} catch {
|
|
1375
|
+
try {
|
|
1376
|
+
const ghUser = (0, import_node_child_process2.execSync)("gh api user -q .login", { encoding: "utf-8", cwd: repoDir }).trim();
|
|
1377
|
+
const remoteUrl = `https://github.com/${ghUser}/${repoName}.git`;
|
|
1378
|
+
(0, import_node_child_process2.execSync)(`git remote add origin ${remoteUrl}`, { stdio: "inherit", cwd: repoDir });
|
|
1379
|
+
(0, import_node_child_process2.execSync)("git push -u origin main", { stdio: "inherit", cwd: repoDir });
|
|
1380
|
+
success(`Connected to existing repo and pushed: ${ghUser}/${repoName}`);
|
|
1381
|
+
} catch (err2) {
|
|
1382
|
+
warn(`Failed to create or connect GitHub repo: ${err2.message}`);
|
|
1383
|
+
info("You can set it up manually: git remote add origin <url> && git push");
|
|
1384
|
+
}
|
|
1377
1385
|
}
|
|
1378
1386
|
}
|
|
1379
1387
|
async function initFromRemote(url, targetDir) {
|
package/package.json
CHANGED