We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d8c69c6 + 4ed3633 commit 06b1ea8Copy full SHA for 06b1ea8
src/utils/commiter.ts
@@ -53,10 +53,15 @@ export const commiter = async () => {
53
54
if (stderrStatus) throw new CliError(`An error occured: ${stderrStatus}`)
55
56
- if (stdoutStatus.includes('no changes added to commit')) {
+ if (
57
+ stdoutStatus.includes('Changes not staged for commit') ||
58
+ stdoutStatus.includes('Untracked files')
59
+ ) {
60
+ const type = stdoutStatus.includes('Changes not staged for commit')
61
+ ? 'modified'
62
+ : 'untracked'
63
const addStagedFiles = await confirm({
- message:
- 'No changes added to commit, would you like to add modified files ?',
64
+ message: `No changes added to commit, would you like to add ${type} files ?`,
65
initialValue: true,
66
})
67
0 commit comments