#1862·penrose

Roger defaults don't work with absolute paths

Author: samestepCreated Sep 30, 2024Updated Nov 21, 2024

In Roger, the default path prefix is .:

https://github.com/penrose/penrose/blob/308640c47ca557efe853137972a637d013e522be/packages/roger/index.ts#L246-L250

This prevents absolute paths from being used if no --path is provided. For instance, this command:

roger trio ~/foo.substance ~/bar.style ~/baz.domain

will fail with this error message:

Error: ENOENT: no such file or directory, open 'Users/me/foo.substance'

This is because we just directly call path.join with the prefix and the provided file path:

https://github.com/penrose/penrose/blob/308640c47ca557efe853137972a637d013e522be/packages/roger/index.ts#L186-L189

And in JavaScript, join('.', '/Users/me/foo.substance') === 'Users/me/foo.substance'.