gogrepoc icon indicating copy to clipboard operation
gogrepoc copied to clipboard

savedir at the end of the command string fails to use path when following -os -lang or -skipfiles

Open mharmless opened this issue 2 years ago • 3 comments

All three options seem to treat the last argument, savedir as an attempt to give them an option. With -os it will complain that the specified os is not one of the valid os types. With -lang it will complain that specified language is not one of the valid languages, and finally with -skipfiles it will run but it will act on your current directory and not the supplied path, implying that the path has been entered as string to skip instead of accepted as savedir.

I don't see an option like -savedir, so I don't see a way to break the option out of itself. I've adjusted to just run the script in the folder I want the work done in order to work around this issue.

mharmless avatar Feb 04 '23 15:02 mharmless

You should be able to put the savedir immediately following the "main" command eg update or download and then the options after it.

On Sun, 5 Feb 2023, 01:28 mharmless, @.***> wrote:

All three options seem to treat the last argument, savedir as an attempt to give them an option. With -os it will complain that the specified os is not one of the valid os types. With -lang it will complain that specified language is not one of the valid languages, and finally with -skipfiles it will run but it will act on your current directory and not the supplied path, implying that the path has been entered a string to skip instead of accepted as savedir.

I don't see an option like -savedir, so I don't see a way to break the option out of itself. I've adjusted to just run the script in the folder I want the work done in order to work around this issue.

— Reply to this email directly, view it on GitHub https://github.com/Kalanyr/gogrepoc/issues/86, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKZ333MTKP7MMO7QQDHXELWVZYP7ANCNFSM6AAAAAAURHFMWE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Kalanyr avatar Feb 04 '23 15:02 Kalanyr

Reordering this way does work. All the help files list savedir last so I was putting it there without any further thought, I don't know why it didn't even occur to me to change the order instead.

mharmless avatar Feb 04 '23 15:02 mharmless

That's the default layout for the help and it's weird because of course open ended options, don't know when to terminate for the fixed parameter (other options can be recognized by the -).

On Sun, 5 Feb 2023, 01:52 mharmless, @.***> wrote:

Reordering this way does work. All the help files list savedir last so I was putting it there without any further thought, I don't know why it didn't even occur to me to change the order instead.

— Reply to this email directly, view it on GitHub https://github.com/Kalanyr/gogrepoc/issues/86#issuecomment-1416786960, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKZ335Z4DUJ3JRQSBESFU3WVZ3M3ANCNFSM6AAAAAAURHFMWE . You are receiving this because you commented.Message ID: @.***>

Kalanyr avatar Feb 05 '23 04:02 Kalanyr