mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
remove atomproject format restriction
This commit is contained in:
@@ -195,10 +195,6 @@ module.exports = function parseCommandLine (processArgs) {
|
||||
|
||||
function readProjectSpecificationSync (filepath, executedFrom) {
|
||||
try {
|
||||
if (!hasAtomProjectFormat(filepath)) {
|
||||
throw new Error('File must match format: *.atomproject.{json, cson}')
|
||||
}
|
||||
|
||||
const readPath = path.isAbsolute(filepath) ? filepath : path.join(executedFrom, filepath)
|
||||
const contents = CSON.readFileSync(readPath)
|
||||
|
||||
@@ -213,13 +209,6 @@ function readProjectSpecificationSync (filepath, executedFrom) {
|
||||
throw new Error(errorMessage)
|
||||
}
|
||||
|
||||
function hasAtomProjectFormat (filepath) {
|
||||
const projectFileFormat = /.*\.atomproject\.(json|cson)/
|
||||
const parsedPath = path.parse(filepath)
|
||||
const filename = parsedPath.name + parsedPath.ext
|
||||
return projectFileFormat.test(filename)
|
||||
}
|
||||
|
||||
function normalizeDriveLetterName (filePath) {
|
||||
if (process.platform === 'win32') {
|
||||
return filePath.replace(/^([a-z]):/, ([driveLetter]) => driveLetter.toUpperCase() + ':')
|
||||
|
||||
Reference in New Issue
Block a user