mirror of
https://github.com/desktop/desktop
synced 2024-09-19 08:02:22 +00:00
ensure you only do this when there aren't uncommitted changes
This commit is contained in:
parent
44246b07c7
commit
5d1ad00ef8
|
@ -64,13 +64,13 @@ function printInstructions(nextVersion: string, entries: Array<string>) {
|
|||
}
|
||||
|
||||
export async function run(args: ReadonlyArray<string>): Promise<void> {
|
||||
//try {
|
||||
// await spawn('git', ['diff-index', '--quiet', 'HEAD'])
|
||||
//} catch {
|
||||
// throw new Error(
|
||||
// `There are uncommitted changes in the working directory. Aborting...`
|
||||
// )
|
||||
//}
|
||||
try {
|
||||
await spawn('git', ['diff-index', '--quiet', 'HEAD'])
|
||||
} catch {
|
||||
throw new Error(
|
||||
`There are uncommitted changes in the working directory. Aborting...`
|
||||
)
|
||||
}
|
||||
|
||||
if (args.length === 0) {
|
||||
throw new Error(
|
||||
|
|
Loading…
Reference in a new issue