Skip to content

Commit 7e95f85

Browse files
committed
Update Git.php
Exceptions now actually show repo path.
1 parent 37fa7b5 commit 7e95f85

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Git.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class GitRepo {
9797
*/
9898
public static function &create_new($repo_path, $source = null) {
9999
if (is_dir($repo_path) && file_exists($repo_path."/.git") && is_dir($repo_path."/.git")) {
100-
throw new Exception('"$repo_path" is already a git repository');
100+
throw new Exception('"'.$repo_path.'" is already a git repository');
101101
} else {
102102
$repo = new self($repo_path, true, false);
103103
if (is_string($source))
@@ -144,11 +144,11 @@ public function set_repo_path($repo_path, $create_new = false, $_init = true) {
144144
$this->repo_path = $repo_path;
145145
if ($_init) $this->run('init');
146146
} else {
147-
throw new Exception('"$repo_path" is not a git repository');
147+
throw new Exception('"'.$repo_path.'" is not a git repository');
148148
}
149149
}
150150
} else {
151-
throw new Exception('"$repo_path" is not a directory');
151+
throw new Exception('"'.$repo_path.'" is not a directory');
152152
}
153153
} else {
154154
if ($create_new) {
@@ -160,7 +160,7 @@ public function set_repo_path($repo_path, $create_new = false, $_init = true) {
160160
throw new Exception('cannot create repository in non-existent directory');
161161
}
162162
} else {
163-
throw new Exception('"$repo_path" does not exist');
163+
throw new Exception('"'.$repo_path.'" does not exist');
164164
}
165165
}
166166
}

0 commit comments

Comments
 (0)