diff --git a/src/commands/commit.ts b/src/commands/commit.ts index 64faeea..4ca9709 100644 --- a/src/commands/commit.ts +++ b/src/commands/commit.ts @@ -79,6 +79,12 @@ ${chalk.grey('——————————————————')}` const remotes = await getGitRemotes(); + if (!remotes.length) { + const { stdout } = await execa('git', ['push']); + if (stdout) outro(stdout); + process.exit(0); + } + if (remotes.length === 1) { const isPushConfirmedByUser = await confirm({ message: 'Do you want to run `git push`?' diff --git a/src/commands/githook.ts b/src/commands/githook.ts index 152d6c6..ee3aec6 100755 --- a/src/commands/githook.ts +++ b/src/commands/githook.ts @@ -11,16 +11,13 @@ const platform = process.platform; let separator = ''; switch (platform) { - // Windows - case 'win32': + case 'win32': // Windows separator = path.sep; break; - // macOS - case 'darwin': + case 'darwin': // macOS separator = ''; break; - // Linux - case 'linux': + case 'linux': // Linux separator = ''; break; default: