mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 04:23:32 +01:00
fix compile errors
This commit is contained in:
@@ -1597,15 +1597,15 @@ export class Repository {
|
||||
}
|
||||
}
|
||||
|
||||
async dropStash(index: number): Promise<void> {
|
||||
async dropStash(index?: number): Promise<void> {
|
||||
const args = ['stash', 'drop'];
|
||||
|
||||
if (typeof index === 'number') {
|
||||
args.push(`stash@{${index}}`);
|
||||
}
|
||||
|
||||
try {
|
||||
await this.run(args);
|
||||
}
|
||||
try {
|
||||
await this.run(args);
|
||||
} catch (err) {
|
||||
if (/No stash found/.test(err.stderr || '')) {
|
||||
err.gitErrorCode = GitErrorCodes.NoStashFound;
|
||||
|
||||
Reference in New Issue
Block a user