Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sassc.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ int compile_file(struct Sass_Options* options, char* input_path, char* outfile)
struct Sass_File_Context* ctx = sass_make_file_context(input_path);
struct Sass_Context* ctx_out = sass_file_context_get_context(ctx);
if (outfile) sass_option_set_output_path(options, outfile);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mgreter, (since I don't have definite proof with steps of reproduction, so I don't want it to create an issue for it): Sometimes, I get a debug info printed on the screen where we are setting sass_option_set_option_path, sometimes it happens on setting the next option. So do we need to guard it with condition: if(output) like here? Don't we have these conditional guards on libsass side, as we pass nullptr for every empty option string we receive to libsass?

PS: Sometimes == extremely occasional (probably when I am doing some random testing and debugging some weird scenarios, I am unable to draw definite pattern for it till now)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably taken over from previous code!
It should be protected in libsass itself, but the code line above actually has some different meaning, since it would overwrite the previous output path in that case. You also did not include which debug info gets printed!?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I will capture it next time. It was invalid instruction or SIGILL (and the first line mentioned glibc). I will try to capture it next time.

Thanks for the clarification on settings! 👍

sass_option_set_input_path(options, input_path);
sass_file_context_set_options(ctx, options);

sass_compile_file_context(ctx);
Expand Down