Skip to content

Commit

Permalink
@ teracyhq#527 | use first extension name
Browse files Browse the repository at this point in the history
  • Loading branch information
datphan committed Oct 30, 2018
1 parent feba768 commit b42d976
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/teracy-dev/extension/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def install(extensions)
sync(extension)
validate(extension)
end

timer_end = Time.now
@logger.debug("installation finished in #{timer_end - timer_start}s of extensions: #{extensions}")
end
Expand All @@ -31,8 +32,15 @@ def install(extensions)

def sync(extension)
return unless Util.true?(extension['enabled'])

if !Util.exist? extension['path']['extension']
@logger.error("#{extension} must have path.extension, please set path.extension then reload again.")

abort
end

lookup_path = File.join(TeracyDev::BASE_DIR, extension['path']['lookup'] ||= DEFAULT_EXTENSION_LOOKUP_PATH)
path = File.join(lookup_path, extension['path']['extension'])
path = File.join(lookup_path, extension['path']['extension'].split('/')[0])
extension['location'].merge!({
"lookup_path" => lookup_path,
"path" => path
Expand Down

0 comments on commit b42d976

Please sign in to comment.