-
Notifications
You must be signed in to change notification settings - Fork 331
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 rename file adding the .yml to the end on Windows #44
Comments
Thanks for the report. Interesting. I don't think this has to do with issue you linked to, at least we are not trying to overwrite a file that already exists. I think the problem is that go-jira has a tmp file open, then tries to rename that file, which apparently seems to be forbidden on windows resulting in:
The goal of the code is to create a tmp file with a known file extension (ie .yml) that will tell editors to use yaml editing mode, the Go TempFile routine does not let you specify the file extension. So we create the file (which also opens it) then try to rename the file while still open. I think the "work around" would be to just close the file, move it, then reopen it. |
…access the file because it is being used by another process" error on windows.
I have published a new release with my work around, which seems to work with my limited testing . Please try it out, downloads here: https://github.com/Netflix-Skunkworks/go-jira/releases/tag/v0.1.2 |
Cool, this is working now, just need to figure out the fields bit in the YAML, seems some fields in our Jira instance are uneditable. |
Yeah, the fields are fussy because Jira allows so much customization. |
closing this issue. |
…cannot access the file because it is being used by another process" error on windows.
Attempting to create a Jira task, I run into the following error when executing
jira create -i Request
I believe this is related to a GO function os.Rename() that has had some debate about functioning on Windows and POSIX systems.
Here are the links to the Code Line Numbers from the errors. The main.go error is just the error check, and I linked the create case statement.
Once again though, still working on the learning GO thing, so hopefully I can pitch in soon.
The text was updated successfully, but these errors were encountered: