-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
bugSomething isn't workingSomething isn't workingpriority-2Affects more than a few users but doesn't prevent core functionsAffects more than a few users but doesn't prevent core functions
Description
Describe the bug
I'm using gh version 1.0.0 (2020-09-16) and trying to use it within a simple node.js application. If I run gh directly from the terminal by using gh repo create foo --private --confirm command, it is creating a folder after the repo creation and initializing repository in that folder.
But if I call ghcli in a node.js application, the repo creation being successful but folder creation and repository initialization doesn't happen.
Steps to reproduce the behavior
- Type
gh repo create foo --private --confirmand run - View the following output and observe the repository initialization in the folder created after the repo creation
✓ Created repository foo on GitHub
Initialized empty Git repository in /development/test/foo/.git/
✓ Initialized repository in './foo/'
- Now create a
test-app.jsfile and paste the following code:
const childProcess = require('child_process');
return new Promise(async (resolve) => {
await childProcess.exec(
'gh repo create foo --private --confirm',
(error, standardOutput, standardError) => {
console.log('repo creation successful');
},
);
});
- Run
node ./test-app.js - Wait for the output
- Check if the repo creation, folder creation and repo initialization in that folder were successful
Expected vs actual behavior
Expected
A folder should be created in the current directory and repository initialization should be completed.
Actual
Repo creation is successful but no folder creation and repository initialization.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpriority-2Affects more than a few users but doesn't prevent core functionsAffects more than a few users but doesn't prevent core functions