Skip to content
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

Fix execution of plugins on Windows #992

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

welteki
Copy link
Member

@welteki welteki commented Jan 26, 2024

Description

  • syscall.Exec is not supported on Windows systems. Use the os/exec package instead.
  • On windows the plugin executables should have the .exe filename extension in order to execute them.

Motivation and Context

  • I have raised an issue to propose this change (required)

Executing plugins on Windows failed with the error Error from plugin: not supported by windows.

How Has This Been Tested?

  • Verified faas-cli plugin get pro works on windows and stores the executable in the correct path $HOME/,openfaas/plugins/pro.exe
Screenshot 2024-01-26 at 12 58 31
  • Verified faas-cli plugin get pro still works Linux systems.

  • Verified running plugins works on Windows systems.

Screenshot 2024-01-26 at 12 59 25
  • Verified running plugins still works on Linux systems.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.

- syscall.Exec is not supported on Windows systems. Use the os/exec
  package instead.
- On windows the plugin executables should have the .exe filename
  extension in order to execute them.

Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
@alexellis alexellis merged commit a3e72b5 into openfaas:master Jan 26, 2024
1 check passed
@welteki welteki deleted the windows-plugins branch January 26, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants