diff options
author | elijah <elijah@riseup.net> | 2013-02-08 23:09:47 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-02-08 23:09:47 -0800 |
commit | 882a019ce26a045d445c38bdc0f348588a30f465 (patch) | |
tree | 5d2ee4ee792376a0f2ebb305a80e74f75e0f4d03 /lib/leap_cli/path.rb | |
parent | 6e5289b7df7ff2f1320ba139303018d260c9b9cf (diff) |
changed `leap init` to `leap new`, made more foolproof.
Diffstat (limited to 'lib/leap_cli/path.rb')
-rw-r--r-- | lib/leap_cli/path.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/leap_cli/path.rb b/lib/leap_cli/path.rb index 7628628..634284d 100644 --- a/lib/leap_cli/path.rb +++ b/lib/leap_cli/path.rb @@ -135,8 +135,12 @@ module LeapCli; module Path end def self.relative_path(path, provider_dir=Path.provider) - path = named_path(path, provider_dir) - path.sub(/^#{Regexp.escape(provider_dir)}\//,'') + if provider_dir + path = named_path(path, provider_dir) + path.sub(/^#{Regexp.escape(provider_dir)}\//,'') + else + path + end end end; end |