Skip to content

Commit

Permalink
fix: improve which python executable is being used (#45)
Browse files Browse the repository at this point in the history
* Update the executable being used

* Update slack_cli_hooks/hooks/get_hooks.py

Co-authored-by: Kazuhiro Sera <[email protected]>

* Add comment to explain reason behind stringification

* Further improve comment

---------

Co-authored-by: Kazuhiro Sera <[email protected]>
  • Loading branch information
WilliamBergamin and seratch authored Jun 5, 2024
1 parent ea5748a commit 74e2d92
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion slack_cli_hooks/hooks/get_hooks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python
import json
import sys
from slack_cli_hooks.protocol import (
Protocol,
MessageBoundaryProtocol,
Expand All @@ -8,7 +9,9 @@
)

PROTOCOL: Protocol
EXEC = "python3"

# Wrap sys.executable in quotes to prevent execution failures if a white space is present in the absolute python path
EXEC = f"'{sys.executable}'" or "python3"


hooks_payload = {
Expand Down

0 comments on commit 74e2d92

Please sign in to comment.