create-kide-app 0.1.4 → 0.1.5
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/index.js +9 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -251,7 +251,15 @@ async function main() {
|
|
|
251
251
|
if (!p.isCancel(visibility)) {
|
|
252
252
|
s.start("Creating GitHub repository");
|
|
253
253
|
try {
|
|
254
|
-
execSync(`gh repo create ${repoName} ${visibility}
|
|
254
|
+
execSync(`gh repo create ${repoName} ${visibility}`, { cwd: projectDir, stdio: "pipe" });
|
|
255
|
+
|
|
256
|
+
// Use SSH for the remote (works with the user's existing SSH keys;
|
|
257
|
+
// avoids HTTPS credential prompts when gh's git_protocol defaults to https).
|
|
258
|
+
execSync(`git remote add origin git@github.com:${ghUser}/${repoName}.git`, {
|
|
259
|
+
cwd: projectDir,
|
|
260
|
+
stdio: "pipe",
|
|
261
|
+
});
|
|
262
|
+
execSync("git branch -M main && git push -u origin main", {
|
|
255
263
|
cwd: projectDir,
|
|
256
264
|
stdio: "pipe",
|
|
257
265
|
});
|