diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2014-08-27 10:42:38 +0000 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2014-08-27 10:42:38 +0000 |
commit | 970a07e886866062342205eed4647623f40bf386 (patch) | |
tree | 48e98dec650ca396c094fde873087d18011fc0e9 | |
parent | 91753e937e729c0fedc9a5dd7ae52b85436b4971 (diff) | |
parent | 81a67f7533a9999a404a03c8c259b3233a2b8c40 (diff) | |
download | gitlab-shell-970a07e886866062342205eed4647623f40bf386.tar.gz |
Merge branch 'abort-check-path' into 'master'
Abort check path
Fixes #13
See merge request !35
-rw-r--r-- | lib/gitlab_shell.rb | 2 | ||||
-rw-r--r-- | spec/gitlab_shell_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb index 086e36b..6edb748 100644 --- a/lib/gitlab_shell.rb +++ b/lib/gitlab_shell.rb @@ -93,7 +93,7 @@ class GitlabShell if File.absolute_path(full_repo_path) == full_repo_path path else - raise "Wrong repository path" + abort "Wrong repository path" end end end diff --git a/spec/gitlab_shell_spec.rb b/spec/gitlab_shell_spec.rb index 6a00638..f997477 100644 --- a/spec/gitlab_shell_spec.rb +++ b/spec/gitlab_shell_spec.rb @@ -167,7 +167,7 @@ describe GitlabShell do before { File.stub(:absolute_path) { 'y' } } subject { -> { shell.send(:escape_path, 'z') } } - it { should raise_error(RuntimeError, "Wrong repository path") } + it { should raise_error(SystemExit, "Wrong repository path") } end def ssh_cmd(cmd) |