You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I try to use the glug command with a complex stylesheet that has multiple files, it fails to resolve the paths given by "include_file" statements. An example error message for a style.glug with include_file "landcover.glug" is:
No such file or directory @ rb_sysopen - /landcover.glug (Errno::ENOENT)
I think this is because the glug command doesn't pass a base_dir option to Stylesheet.new, and File.join('', 'foo') == "/foo"
Since base_dir is only used when handling "include_file", perhaps it's possible to remove this option entirely, and treat all "include_file" as relative paths to the file that has the statement? This would also mean for example that you could do:
style.glug - include_file "shared/landcover.glug"
shared/landcover.glug - include_file "colours.glug" <- this would load shared/colours.glug
But if that's not possible, then the glug binary should at least pass the directory of the target file as the base_dir.
The text was updated successfully, but these errors were encountered:
If I try to use the
glug
command with a complex stylesheet that has multiple files, it fails to resolve the paths given by "include_file" statements. An example error message for a style.glug withinclude_file "landcover.glug"
is:I think this is because the
glug
command doesn't pass abase_dir
option to Stylesheet.new, andFile.join('', 'foo') == "/foo"
Since
base_dir
is only used when handling "include_file", perhaps it's possible to remove this option entirely, and treat all "include_file" as relative paths to the file that has the statement? This would also mean for example that you could do:include_file "shared/landcover.glug"
include_file "colours.glug"
<- this would loadshared/colours.glug
But if that's not possible, then the
glug
binary should at least pass the directory of the target file as thebase_dir
.The text was updated successfully, but these errors were encountered: