Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strconv.Atoi: parsing "migrate": invalid syntax #8

Closed
nathany opened this issue Dec 21, 2017 · 8 comments
Closed

strconv.Atoi: parsing "migrate": invalid syntax #8

nathany opened this issue Dec 21, 2017 · 8 comments

Comments

@nathany
Copy link

nathany commented Dec 21, 2017

This error started occurring recently. Maybe related to a change in https://github.com/urfave/cli?

journey -url "postgres://u:p@localhost/db?sslmode=disable" -path ./db migrate migrate +1
FATA[0000] Unable to parse param <n>
error="strconv.Atoi: parsing \"migrate\": invalid syntax"
@nathany
Copy link
Author

nathany commented Dec 21, 2017

Yes, commit c6eb2a051026c083d4e33591f8d6e95d5f4189dc of urfave/cli works. bisecting now

@nathany
Copy link
Author

nathany commented Dec 21, 2017

"df562bf1a8626f2d16f91fcbf7230a5bdca3d592 is the first bad commit"

https://github.com/urfave/cli/pull/686/files

@nathany
Copy link
Author

nathany commented Dec 21, 2017

/cc @jszwedko @baude

@baude
Copy link

baude commented Dec 22, 2017

are you using the skipargreorder ?

@nathany
Copy link
Author

nathany commented Dec 22, 2017

I'm not entirely sure what journey uses.

I think the relevant code is in https://github.com/db-journey/journey/blob/master/commands/migrate_commands.go which doesn't look like it's using that option.

@baude
Copy link

baude commented Dec 22, 2017

I'd be inclined to try it with that option. I dont know this application very well but it seems like after -path you have a path argument and then some stuff that isn't really an option ?

@gravis
Copy link
Member

gravis commented Dec 23, 2017

Thanks @nathany for the investigation.
@baude : path and url are global flags, hence they're before the command migrate, then the subcommand migrate with the arg +1.

Since this was working fine until this commit , I consider this a bug in cli, and we should investigate there instead, unless there's something I didn't catch here.

@jszwedko
Copy link

Apologies for the delay in responding to this and for introducing this regression. I believe I've fixed this in urfave/cli#697 (and added a test case).

@gravis gravis closed this as completed Jan 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants