mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
shell_command: simplify the return conditions
This commit is contained in:
parent
f6966b320e
commit
2b7785a64d
1 changed files with 1 additions and 3 deletions
|
@ -54,9 +54,7 @@ class Pry
|
|||
end
|
||||
|
||||
def path_from_cd_path(dest)
|
||||
return unless dest
|
||||
return unless cd_path_exists?
|
||||
return if special_case_path?(dest)
|
||||
return if !(dest && cd_path_exists?) || special_case_path?(dest)
|
||||
|
||||
cd_path_env.split(File::PATH_SEPARATOR).each do |path|
|
||||
if File.directory?(path) && path.split(File::SEPARATOR).last == dest
|
||||
|
|
Loading…
Reference in a new issue