Open c84c opened 2 years ago
Fix #121
During refactoring on commit change plugin build mechanism the new flogo executable is created instead of renamed.
flogo
Linux system not allows to update a running executable resulting in error text file busy.
text file busy
The PR insert a SwapFile function to allow replacement of running executable (Thanks to @fenollp and his gist)
SwapFile
Old renaming implementation on commits before change plugin build mechanism : https://github.com/project-flogo/cli/blob/22cf3e37128c33d6c0bbb5cd90af3cb978a1083b/commands/plugin.go#L267
Actual implementation on master: Executable copy: https://github.com/project-flogo/cli/blob/5c3e1e36e17aa2ead2d5774d0ce89b2641107c8f/commands/pluginhelper.go#L108 copyFile function https://github.com/project-flogo/cli/blob/5c3e1e36e17aa2ead2d5774d0ce89b2641107c8f/util/file.go#L131-L143
Have you planned when to merge the Pull Request?
Implements
Fix #121
Discussion
During refactoring on commit change plugin build mechanism the new
flogo
executable is created instead of renamed.Linux system not allows to update a running executable resulting in error
text file busy
.The PR insert a
SwapFile
function to allow replacement of running executable (Thanks to @fenollp and his gist)Code references
Old renaming implementation on commits before change plugin build mechanism : https://github.com/project-flogo/cli/blob/22cf3e37128c33d6c0bbb5cd90af3cb978a1083b/commands/plugin.go#L267
Actual implementation on master: Executable copy: https://github.com/project-flogo/cli/blob/5c3e1e36e17aa2ead2d5774d0ce89b2641107c8f/commands/pluginhelper.go#L108 copyFile function https://github.com/project-flogo/cli/blob/5c3e1e36e17aa2ead2d5774d0ce89b2641107c8f/util/file.go#L131-L143