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

Unable to finish hotfix: FATAL unable to parse provided options with getopt. #392

Closed
mattijsf opened this Issue Aug 24, 2018 · 7 comments

Comments

Projects
None yet
2 participants
@mattijsf

mattijsf commented Aug 24, 2018

OS: MacOS 10.13.6 (17G65)
Fork: 1.0.69.4

Which I right click a hotfix branch and choose Git Flow > Finish ... I get the following error:

flags:WARN getopt: illegal option -- f
 -- /var/folders/3q/738s_cl50gz9lyb8q1_pmkgh0000gn/T/fork-tagMessage.txt 3.2.2
flags:FATAL unable to parse provided options with getopt.

The content of the mentioned file is empty.

If I manually run git-flow hotfix finish it works.

screenshot 2018-08-24 16 32 44
screenshot 2018-08-24 16 33 04

I tied it on multiple repos and eventually using the following minimal steps:

  • Create new / blank repository
  • Git Flow > Initialize GitFlow...
  • Git Flow > Start Hotfix
  • [some mock commit or no commit, doesn't really matter]
  • (right-click) hotfix branch: Git Flow > Finish ...

I only experience this with Hotfixes, Starting/Finishing Features goes fine.

~/Library/Caches/Fork/fork.log:

📢> Fork Version: 1.0.69.4 Build: 1.0.69.4 PID: 14874
📢> XCGLogger Version: 4.0.0 - Level: Debug
📢> XCGLogger writing log to: file:///Users/[USER]/Library/Caches/Fork/fork.log
📢[main] [AppDelegate.swift:98] applicationDidFinishLaunching > Git instance: system
🔅[main] [ForkService.swift:34] gitHubService > GitHub service status changed. New status: authenticated
📢[main] [RemoteServiceNotificationManager.swift:75] stop() > Stop checking GitHub notifications
📢[main] [RemoteServiceNotificationManager.swift:50] start() > Start checking GitHub notifications
📢[NSOperationQueue 0x60800002ac80 (QOS: UNSPECIFIED)] [GetChangedFilesGitCommand.swift:125] execute(_:excludeUntrackedFiles:includeIgnoredFiles:) > GetChangedFilesGitCommand 73.876406
📢[main] [RefreshRepositoryChangedFilesCommand.swift:35] execute > Refresh changes in 'test-repo'. Updated (0 files).
📢[NSOperationQueue 0x60800002ac80 (QOS: UNSPECIFIED)] [GetRepositoryStateGitCommand.swift:13] execute > GetRepositoryStateGitCommand: 74.81372
⚠️[NSOperationQueue 0x60800002ac80 (QOS: UNSPECIFIED)] [GitRequest.swift:143] execute(suppressErrorLogging:cancelationToken:) > Git error 'config --get-regexp ^remote\..*':

⚠️[NSOperationQueue 0x60800002ac80 (QOS: UNSPECIFIED)] [GetRemotesGitCommand.swift:19] execute > unknownError(status: 1, output: "", error: "")
🔅[NSOperationQueue 0x60800002ac80 (QOS: UNSPECIFIED)] [GetReferencesGitCommand.swift:63] execute > GetReferencesGitCommand: 72.484305
🔅[NSOperationQueue 0x60800002ac80 (QOS: UNSPECIFIED)] [GetRevisionsGitCommand.swift:152] execute(_:topoOrder:head:filterBranches:references:stashes:hideRemotesInRevisionList:showReflogInRevisionList:progress:) > GetRevisionsGitCommand: 9.888554
📢[NSOperationQueue 0x60800002ac80 (QOS: UNSPECIFIED)] [RefreshRepositoryDataCommand.swift:33] execute > Refresh 'test-repo'. Repository data updated.
🔅[main] [GetReferencesGitCommand.swift:63] execute > GetReferencesGitCommand: 10.152682
⚠️[NSOperationQueue 0x60800002ac80 (QOS: UNSPECIFIED)] [GitRequest.swift:143] execute(suppressErrorLogging:cancelationToken:) > Git error 'flow hotfix finish -f /var/folders/3q/738s_cl50gz9lyb8q1_pmkgh0000gn/T/fork-tagMessage.txt test':
flags:WARN getopt: illegal option -- f
 -- /var/folders/3q/738s_cl50gz9lyb8q1_pmkgh0000gn/T/fork-tagMessage.txt test
flags:FATAL unable to parse provided options with getopt.

📢[NSOperationQueue 0x60800002ac80 (QOS: UNSPECIFIED)] [GetRepositoryStateGitCommand.swift:13] execute > GetRepositoryStateGitCommand: 70.159477
📢[NSOperationQueue 0x60800002ac80 (QOS: UNSPECIFIED)] [GetChangedFilesGitCommand.swift:125] execute(_:excludeUntrackedFiles:includeIgnoredFiles:) > GetChangedFilesGitCommand 70.770455
📢[main] [RefreshRepositoryChangedFilesCommand.swift:35] execute > Refresh changes in 'test-repo'. Updated (0 files).
⚠️[NSOperationQueue 0x60800002ac80 (QOS: UNSPECIFIED)] [GitRequest.swift:143] execute(suppressErrorLogging:cancelationToken:) > Git error 'config --get-regexp ^remote\..*':

⚠️[NSOperationQueue 0x60800002ac80 (QOS: UNSPECIFIED)] [GetRemotesGitCommand.swift:19] execute > unknownError(status: 1, output: "", error: "")
🔅[NSOperationQueue 0x60800002ac80 (QOS: UNSPECIFIED)] [GetReferencesGitCommand.swift:63] execute > GetReferencesGitCommand: 73.041577

@mattijsf

This comment has been minimized.

mattijsf commented Aug 24, 2018

I tried selecting a different Git Instance from the Preferences but it doesn't make a difference.

@DanPristupov

This comment has been minimized.

Contributor

DanPristupov commented Aug 25, 2018

Did you define any global (system-wide) git flow options?

@mattijsf

This comment has been minimized.

mattijsf commented Aug 25, 2018

@DanPristupov No not that I'm aware of. I checked my .gitconfig:

[core]
	excludesfile = /Users/mattijs/.gitignore_global
[user]
	name = Mattijs...
	email = mattijs...@....
[commit]
	template = /Users/mattijs/.stCommitMsg

Nothing flow related.

I also checked my .bash_profile but I don't see anything suspicious that could conflict with other shell commands. I even cleared .bash_profile it and restarted Fork. No difference.

@DanPristupov

This comment has been minimized.

Contributor

DanPristupov commented Aug 27, 2018

OK. I checked the source code and I have another suspicion. Do you have git-flow installed on your system manually (using brew, for example)?

@mattijsf

This comment has been minimized.

mattijsf commented Aug 27, 2018

@DanPristupov That was it! I had git-flow installed from brew 👍 See below:

~ mattijs$ which git-flow
/usr/local/bin/git-flow
~ mattijs$ cat /usr/local/bin/git-flow
#!/bin/bash
exec "/usr/local/Cellar/git-flow/0.4.1/libexec/bin/git-flow" "$@"
~ mattijs$ brew uninstall git-flow
Uninstalling /usr/local/Cellar/git-flow/0.4.1... (18 files, 119.2KB)
~ mattijs$ which git-flow
~ mattijs$ 

Fork behaved fine again after I uninstalled the git-flow package.

Feel free to close this one, though I think it would be better if Fork plays nicely with a globally installed git-flow binary.

@mattijsf

This comment has been minimized.

mattijsf commented Aug 27, 2018

By the way, I had a colleague who had the same problem. It was also caused by the git-flow brew package and solved after removing it.

I ended up reinstalling brew's git-flow again because I prefer being able to invoke git flow commands from the command line.

@DanPristupov

This comment has been minimized.

Contributor

DanPristupov commented Aug 27, 2018

@mattijsf OK, it clearly shows there's a bug on my side. Fork should call internal git-flow, not the system one. I'll fix this in the next update. Thank you!

@DanPristupov DanPristupov added this to the 1.0.70 milestone Sep 5, 2018

@DanPristupov DanPristupov added the done label Sep 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment