Skip to content

Commit

Permalink
Merge pull request #309 from vtex/feature/allow-installation-without-…
Browse files Browse the repository at this point in the history
…version

Allow installation of an app without specifying version
  • Loading branch information
tamorim authored Jun 5, 2017
2 parents 26fed8e + 2f4be3e commit 9b11910
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const validateAppManifest = (manifest: Manifest): Manifest => {
}

const appName = new RegExp(`^${vendorPattern}\\.${namePattern}$`)
const appLocator = new RegExp(`^${vendorPattern}\\.${namePattern}@.+$`)
const appLocator = new RegExp(`^${vendorPattern}\\.${namePattern}(?:@${wildVersionPattern})?$`)

export const validateApp = (app: string, skipVersion: boolean = false) => {
const regex = skipVersion ? appName : appLocator
Expand Down
1 change: 1 addition & 0 deletions src/modules/apps/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const installApps = async (apps: string[], reg: string): Promise<void> => {
return
}
const app = validateApp(head(apps))

try {
log.debug('Starting to install app', app)
await installApp(app, reg)
Expand Down

0 comments on commit 9b11910

Please sign in to comment.