Skip to content

Commit

Permalink
fix: ignore empty stash
Browse files Browse the repository at this point in the history
Ignore "No stash entries found." when stashing
is enabled but no files were actually stashed.

Resolves: #55
  • Loading branch information
saitho committed Nov 27, 2023
1 parent 67192b9 commit d2cac43
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/perform-backmerge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,13 @@ export async function performBackmerge(git: Git, pluginConfig: Partial<Config>,

if (options.restoreWorkspace) {
context.logger.log('Restoring stashed files to Git workspace.');
await git.unstash();
try {
await git.unstash();
} catch (error) {
if (!(error instanceof Error) || !(error.message === 'No stash entries found.')) {
throw error;
}
}
}
}

Expand Down

0 comments on commit d2cac43

Please sign in to comment.