You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm pretty new to Unison, so this might be a misunderstaning on my part! If I understand the following section correcly, it seems that unison-gitignore will mistakingly detect profile usage if any option is provided before the main arguments.
"No .gitignore patterns will be added since a unison profile was given"
)
returnFalse
For example:
# Here we call -auto before the root arguments, and .gitignore patterns are not added
% unison-gitignore -auto root1 root2
unison_gitignore :: WARNING :: No .gitignore patterns will be added since a unison profile was given
# Now we move -auto to after the root arguments, and everything works as expected
% unison-gitignore dir1 dir2 -auto
Again, new to unison, but the usage docs state:
Usage: unison [options]
or unison root1 root2 [options]
or unison profilename [options]
So would detecting if cmd[1].startswith("-") even detect profilename—or is that not the point?
Also thanks for sharing the great tool, it's been incredibly useful to me!
The text was updated successfully, but these errors were encountered:
@paw-lu hey sorry this is so late! cmd at this point will not contain the first argument (https://github.com/lime-green/unison-gitignore/blob/master/src/unison_gitignore/main.py#L20-L22) so in your example it should contain ["-auto", "root1", "root2"] and hence not detect profile usage. I think what I had in mind with this is that the usage of unison profilename [options] I could detect if seeing if the second argument is an option and hence assume profile is being used. It's weird that unison-gitignore -auto root1 root2 is showing that error message for you though, since that's not how the code should work and I can't reproduce it with using that command
I'm pretty new to Unison, so this might be a misunderstaning on my part! If I understand the following section correcly, it seems that unison-gitignore will mistakingly detect profile usage if any option is provided before the main arguments.
unison-gitignore/src/unison_gitignore/util.py
Lines 56 to 61 in 3ea8e70
For example:
Again, new to unison, but the usage docs state:
So would detecting if
cmd[1].startswith("-")
even detectprofilename
—or is that not the point?Also thanks for sharing the great tool, it's been incredibly useful to me!
The text was updated successfully, but these errors were encountered: