mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 01:17:16 +08:00
FIX: Accept github theme urls with a trailing slash
This commit is contained in:
@ -11,6 +11,7 @@ class ThemeStore::GitImporter
|
||||
def initialize(url, private_key: nil, branch: nil)
|
||||
@url = url
|
||||
if @url.start_with?("https://github.com") && !@url.end_with?(".git")
|
||||
@url = @url.gsub(/\/$/, '')
|
||||
@url += ".git"
|
||||
end
|
||||
@temp_folder = "#{Pathname.new(Dir.tmpdir).realpath}/discourse_theme_#{SecureRandom.hex}"
|
||||
|
Reference in New Issue
Block a user