瀏覽代碼

fix: use URI.open to fetch docs

Oliver Eyton-Williams 2 年之前
父節點
當前提交
25893614b3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/tasks/docs.thor

+ 1 - 1
lib/tasks/docs.thor

@@ -241,7 +241,7 @@ class DocsCLI < Thor
           ['index.json', 'meta.json'].each do |filename|
             json = "https://documents.devdocs.io/#{doc.path}/#{filename}?#{time}"
             begin
-              open(json) do |file|
+              URI.open(json) do |file|
                 mutex.synchronize do
                   path = File.join(dir, filename)
                   File.write(path, file.read)