Skip to content

Commit 0c35fe2

Browse files
committed
Add quotes to project path
This fixes an issue when the project path contains spaces Fixes #116
1 parent 743942f commit 0c35fe2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

priv/hook_template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
[ "$project_path" != "" ] && cd $project_path
3+
[ "$project_path" != "" ] && cd "$project_path"
44

55
$mix_path git_hooks.run $git_hook "$@"
66
[ $? -ne 0 ] && exit 1

test/mix/tasks/git_hooks/install_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ defmodule Mix.Tasks.InstallTest do
3434

3535
~s(#!/bin/sh
3636
37-
[ "#{app_path}" != "" ] && cd #{app_path}
37+
[ "#{app_path}" != "" ] && cd "#{app_path}"
3838
3939
mix git_hooks.run #{git_hook} "$@"
4040
[ $? -ne 0 ] && exit 1

0 commit comments

Comments
 (0)