-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
63 changed files
with
24,896 additions
and
1,190 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 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 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 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,28 @@ | ||
#!/usr/bin/env ts-node | ||
|
||
/*! | ||
* Determines the repository to use based on the provided parameters. | ||
* Copyright 2020-2024 Chocolatey Software | ||
* Licensed under Apache License (https://github.com/chocolatey/choco-theme/blob/main/LICENSE) | ||
*/ | ||
|
||
import * as process from 'process'; | ||
import { repositoryConfig } from '../data/repository-config'; | ||
|
||
// Process args | ||
const params: Record<string, string> = {}; | ||
process.argv.slice(2).forEach(val => { | ||
const [key, value] = val.split('='); | ||
|
||
if (key.startsWith('--')) { | ||
params[key.slice(2)] = value; | ||
} | ||
}); | ||
|
||
// Determine repository information | ||
let repository = repositoryConfig.default; | ||
if (params.repository && repositoryConfig[params.repository]) { | ||
repository = repositoryConfig[params.repository]; | ||
} | ||
|
||
export { repository }; |
Oops, something went wrong.