Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/git/src/git-editor-main.ts
3314 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
import { IPCClient } from './ipc/ipcClient';
6
7
function fatal(err: any): void {
8
console.error(err);
9
process.exit(1);
10
}
11
12
function main(argv: string[]): void {
13
const ipcClient = new IPCClient('git-editor');
14
const commitMessagePath = argv[argv.length - 1];
15
16
ipcClient.call({ commitMessagePath }).then(() => {
17
setTimeout(() => process.exit(0), 0);
18
}).catch(err => fatal(err));
19
}
20
21
main(process.argv);
22
23