mirror of
https://github.com/atom/atom.git
synced 2026-02-15 09:05:58 -05:00
Don't need to replace now, use module directly
This commit is contained in:
@@ -25,11 +25,6 @@ class Package
|
||||
@resourcePathWithTrailingSlash ?= "#{atom.packages.resourcePath}#{path.sep}"
|
||||
packagePath?.startsWith(@resourcePathWithTrailingSlash)
|
||||
|
||||
@normalizeMetadata: (metadata) ->
|
||||
if typeof metadata.repository is 'string'
|
||||
normalizePackageData(metadata)
|
||||
metadata.repository.url = metadata.repository.url.replace(/^git\+/, '')
|
||||
|
||||
@loadMetadata: (packagePath, ignoreErrors=false) ->
|
||||
packageName = path.basename(packagePath)
|
||||
if @isBundledPackagePath(packagePath)
|
||||
@@ -38,7 +33,7 @@ class Package
|
||||
if metadataPath = CSON.resolve(path.join(packagePath, 'package'))
|
||||
try
|
||||
metadata = CSON.readFileSync(metadataPath)
|
||||
@normalizeMetadata(metadata)
|
||||
normalizePackageData(metadata)
|
||||
catch error
|
||||
throw error unless ignoreErrors
|
||||
|
||||
|
||||
Reference in New Issue
Block a user