mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
22 lines
389 B
TypeScript
22 lines
389 B
TypeScript
import gitconfig = require('gitconfiglocal');
|
|
|
|
gitconfig('dir', (error, config) => {
|
|
if (error) {
|
|
// oh no
|
|
return;
|
|
}
|
|
|
|
const url = config.remote;
|
|
const filemode = config.core.filemode;
|
|
});
|
|
|
|
gitconfig('dir', {gitDir: './'}, (error, config) => {
|
|
if (error) {
|
|
// oh no
|
|
return;
|
|
}
|
|
|
|
const url = config.remote.origin.url;
|
|
const filemode = config.core.filemode;
|
|
});
|