Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 39511b7

Browse files
authored
fix: Allign to new git cresentials file path (#1341)
Signed-off-by: Igor Vinokur <ivinokur@redhat.com>
1 parent e45ccac commit 39511b7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

extensions/eclipse-che-theia-plugin-ext/src/node/che-github-service.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
* SPDX-License-Identifier: EPL-2.0
99
***********************************************************************/
1010
import * as fs from 'fs-extra';
11-
import * as os from 'os';
1211
import * as path from 'path';
1312

1413
import { CheGitHubService } from '../common/che-protocol';
@@ -17,7 +16,7 @@ import { injectable } from 'inversify';
1716
@injectable()
1817
export class CheGithubServiceImpl implements CheGitHubService {
1918
async getToken(): Promise<string | undefined> {
20-
const credentialsPath = path.resolve(os.homedir(), '.git-credentials', 'credentials');
19+
const credentialsPath = path.resolve('/.git-credentials', 'credentials');
2120
if (fs.existsSync(credentialsPath)) {
2221
const token = fs.readFileSync(credentialsPath).toString();
2322
return token.substring(token.lastIndexOf(':') + 1, token.indexOf('@'));

0 commit comments

Comments
 (0)