Skip to content

Commit

Permalink
Match production URL properly when trying to warn about bad uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed Jul 25, 2017
1 parent 51bf15e commit 3e41ee4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/medic-conf.js
Expand Up @@ -28,7 +28,7 @@ const projectName = fs.path.basename(fs.path.resolve('.'));
const instanceUrl = args[0];
const couchUrl = `${instanceUrl}/medic`;

const productionUrlMatch = /^http(?:s)?:\/\/(.*)\.app\.medicmobile\.org(?:$|\/)/.exec(instanceUrl);
const productionUrlMatch = /^http(?:s)?:\/\/(?:[^@]*@)?(.*)\.app\.medicmobile\.org(?:$|\/)/.exec(instanceUrl);
if(productionUrlMatch && productionUrlMatch[1] !== projectName) {
if(!readline.keyInYN('\x1b[33mWARN ' +
`Attempting to upload configuration for \x1b[31m${projectName}\x1b[33m ` +
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "medic-configurer-beta",
"version": "1.1.4",
"version": "1.1.5",
"description": "Configure Medic Mobile deployments",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 3e41ee4

Please sign in to comment.