app-json / app.json

A node module for working with app.json files and deploying app.json apps to Heroku. Designed to work on the server, the browser, and the command line.
132 stars 26 forks source link

app.json init crashes #22

Open TravelingTechGuy opened 9 years ago

TravelingTechGuy commented 9 years ago

OSX Yosemite/Node 0.12.2/app.json@1.2.1

$ app.json init
/opt/local/lib/node_modules/app.json/lib/heroku.js:153
        return config[key].url.match(/git@heroku\.com:(.*)\.git/)[1]
                                                                 ^
TypeError: Cannot read property '1' of null
    at /opt/local/lib/node_modules/app.json/lib/heroku.js:153:66
    at Array.map (native)
    at EventEmitter.module.exports.Heroku.deriveAppNamesFromLocalGitConfig (/opt/local/lib/node_modules/app.json/lib/heroku.js:152:8)
    at Command.<anonymous> (/opt/local/lib/node_modules/app.json/bin/cli:60:14)
    at Command.listener (/opt/local/lib/node_modules/app.json/node_modules/commander/index.js:301:8)
    at Command.emit (events.js:110:17)
    at Command.parseArgs (/opt/local/lib/node_modules/app.json/node_modules/commander/index.js:610:12)
    at Command.parse (/opt/local/lib/node_modules/app.json/node_modules/commander/index.js:458:21)
    at Object.<anonymous> (/opt/local/lib/node_modules/app.json/bin/cli:234:9)
    at Module._compile (module.js:460:26)
denyago commented 9 years ago

Crashes on origins like url = https://git.heroku.com/foo.git Works on origins like url = git@heroku.com:foo.git

TravelingTechGuy commented 9 years ago

Well, I see no one touched this repo in months, so I assume no fix is coming.

zeke commented 9 years ago

Hi @TravelingTechGuy and @denyago. I worked on this project just before leaving Heroku, and it has not been maintained by anyone at the company since I left last fall. Unfortunately I don't have the free time to actively develop it any more, but I will happily review pull requests, and will hand off the project to anyone who wishes to take it over.

TravelingTechGuy commented 9 years ago

Hi @zeke - sounds good. I'll see if I can dive into this.

TravelingTechGuy commented 9 years ago

Ok, now this module can't even be installed (on Windows, Node 0.12.5).

Heroku: please mark this repo "Defunct" and remove the module from the NPM repository.

josegonzalez commented 8 years ago

@denyago thanks for the hint, was relatively easy to fix!

@zeke thanks for your initial work on this repository, it is very much appreciated :) Hope you can still approve my pr/make a release to github :)

etewiah commented 7 years ago

Just to clarify, the remote url can be changed with the "git remote set-url" command.

In my case it was:

git remote set-url heroku git@heroku.com:propertywebbuilder.git

onemonster commented 7 years ago

https://git.heroku.com/my_app.git Mine was in this format so I fixed it with return config[key].url.match(/git.heroku\.com\/(.*)\.git/)[1]) pretty easy fix