-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ Implement global configuration feature which gives the possibility to store a config file in the user home directory that will override the default config. ref: #9 pr: #10
- Loading branch information
1 parent
910df80
commit f2d11ae
Showing
4 changed files
with
31 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { execute } from '../executer'; | ||
|
||
/** Gets current repo top-level path */ | ||
export async function repoPath(repo: string): Promise<string> { | ||
const command = ['rev-parse', '--show-toplevel']; | ||
const { code, out } = await execute(repo, command); | ||
if (code !== 0) return undefined; | ||
return out?.trim(); | ||
} |