Skip to content

Commit 74e2d92

Browse files
fix: improve which python executable is being used (#45)
* 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]>
1 parent ea5748a commit 74e2d92

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

slack_cli_hooks/hooks/get_hooks.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python
22
import json
3+
import sys
34
from slack_cli_hooks.protocol import (
45
Protocol,
56
MessageBoundaryProtocol,
@@ -8,7 +9,9 @@
89
)
910

1011
PROTOCOL: Protocol
11-
EXEC = "python3"
12+
13+
# Wrap sys.executable in quotes to prevent execution failures if a white space is present in the absolute python path
14+
EXEC = f"'{sys.executable}'" or "python3"
1215

1316

1417
hooks_payload = {

0 commit comments

Comments
 (0)