Skip to content

Commit

Permalink
fix stupid win10 stupid problems with params
Browse files Browse the repository at this point in the history
  • Loading branch information
lovato committed Apr 10, 2020
1 parent 05640e3 commit 397dddb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hooks4git/hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import configparser
import datetime
from hooks4git import __version__
from hooks4git.tools import os_call, copy_file, add_usersitepackages_to_path
from hooks4git.tools import os_call, copy_file, add_usersitepackages_to_path, get_platform
from hooks4git.console import Display
import shlex

Expand Down Expand Up @@ -88,8 +88,9 @@ def run_hook_cmd(command, files):
if cmd[0:21] == "h4g/check_branch_name":
_command = shlex.split(command)
command = _command[0]
if len(_command) > 1:
command = command + ' "' + _command[1] + '"'
if "Windows" not in get_platform():
if len(_command) > 1:
command = command + ' "' + _command[1] + '"'
# end

cmd_list = cmd.split("/")
Expand Down

0 comments on commit 397dddb

Please sign in to comment.