mirror of https://github.com/onivim/oni.git
Fix unable to open a new file via CLI (#2683)
* Temporary fix for yarn complaining about upath See this issue for details: https://github.com/anodynos/upath/issues/21 * Fix #2675: cannot open a new file Made a minor change to browser/src/App.ts to only filter files if they exists and pass them through otherwise.
This commit is contained in:
parent
6128e77ced
commit
d66d786218
|
@ -111,7 +111,13 @@ export const start = async (args: string[]): Promise<void> => {
|
|||
arg => (path.isAbsolute(arg) ? arg : path.join(currentWorkingDirectory, arg)),
|
||||
)
|
||||
|
||||
const filesToOpen = normalizedFiles.filter(f => fs.existsSync(f) && fs.statSync(f).isFile())
|
||||
const filesToOpen = normalizedFiles.filter(f => {
|
||||
if (fs.existsSync(f)) {
|
||||
return fs.statSync(f).isFile()
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
})
|
||||
const foldersToOpen = normalizedFiles.filter(
|
||||
f => fs.existsSync(f) && fs.statSync(f).isDirectory(),
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue