Fix regex
This commit is contained in:
parent
56292b1fa3
commit
32c9898fa4
2 changed files with 2 additions and 2 deletions
2
lib/config-utils.js
generated
2
lib/config-utils.js
generated
|
|
@ -244,7 +244,7 @@ function getLocalConfig(configFile, workspacePath) {
|
|||
}
|
||||
function getRemoteConfig(configFile) {
|
||||
// validate the config location
|
||||
const format = new RegExp('(?<owner>[^/]+)/(?<repo>[^/]+)/(?<filepath>[^@]+)@(<?ref>.*)');
|
||||
const format = new RegExp('(?<owner>[^/]+)/(?<repo>[^/]+)/(?<filepath>[^@]+)@(?<ref>.*)');
|
||||
const pieces = format.exec(configFile);
|
||||
if (pieces === null || pieces.length < 4) {
|
||||
throw new Error(getConfigFileRepoFormatInvalid(configFile));
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ function getLocalConfig(configFile: string, workspacePath: string): any {
|
|||
|
||||
function getRemoteConfig(configFile: string): any {
|
||||
// validate the config location
|
||||
const format = new RegExp('(?<owner>[^/]+)/(?<repo>[^/]+)/(?<filepath>[^@]+)@(<?ref>.*)');
|
||||
const format = new RegExp('(?<owner>[^/]+)/(?<repo>[^/]+)/(?<filepath>[^@]+)@(?<ref>.*)');
|
||||
const pieces = format.exec(configFile);
|
||||
if (pieces === null || pieces.length < 4) {
|
||||
throw new Error(getConfigFileRepoFormatInvalid(configFile));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue