Skip to content

Commit 37fa7b5

Browse files
committed
Update CI_Git.php
Exceptions now actually show repo path.
1 parent 5d54f49 commit 37fa7b5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CI_Git.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class GitRepo {
104104
*/
105105
public static function &create_new($repo_path, $source = null) {
106106
if (is_dir($repo_path) && file_exists($repo_path."/.git") && is_dir($repo_path."/.git")) {
107-
throw new Exception('"$repo_path" is already a git repository');
107+
throw new Exception('"'.$repo_path.'" is already a git repository');
108108
} else {
109109
$repo = new self($repo_path, true, false);
110110
if (is_string($source))
@@ -151,11 +151,11 @@ public function set_repo_path($repo_path, $create_new = false, $_init = true) {
151151
$this->repo_path = $repo_path;
152152
if ($_init) $this->run('init');
153153
} else {
154-
throw new Exception('"$repo_path" is not a git repository');
154+
throw new Exception('"'.$repo_path.'" is not a git repository');
155155
}
156156
}
157157
} else {
158-
throw new Exception('"$repo_path" is not a directory');
158+
throw new Exception('"'.$repo_path.'" is not a directory');
159159
}
160160
} else {
161161
if ($create_new) {
@@ -167,7 +167,7 @@ public function set_repo_path($repo_path, $create_new = false, $_init = true) {
167167
throw new Exception('cannot create repository in non-existent directory');
168168
}
169169
} else {
170-
throw new Exception('"$repo_path" does not exist');
170+
throw new Exception('"'.$repo_path.'" does not exist');
171171
}
172172
}
173173
}

0 commit comments

Comments
 (0)