remove atomproject format restriction

This commit is contained in:
Philip Weiss
2018-03-06 13:33:54 -08:00
parent 685292bb8d
commit aa925c2a4c

View File

@@ -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() + ':')