Patching the cli script with:
function str_replace_one($needle, $replace, $haystack) {
$pos = strpos($haystack, $needle);
if ($pos !== false) {
$newstring = substr_replace($haystack, $replace, $pos, strlen($needle));
return $newstring;
}
return $haystack;
}
and trying the V4 version gives:
[05-Feb-2017 13:16:09 Europe/London] Default exception handler: Exception - Undefined variable $btn-default-color: line: 398 Debug:
Error code: generalexceptionmessage
* line 3418 of \lib\scssphp\Compiler.php: Leafo\ScssPhp\Exception\CompilerException thrown
* line 3088 of \lib\scssphp\Compiler.php: call to Leafo\ScssPhp\Compiler->throwError()
* line 2091 of \lib\scssphp\Compiler.php: call to Leafo\ScssPhp\Compiler->get()
* line 1575 of \lib\scssphp\Compiler.php: call to Leafo\ScssPhp\Compiler->reduce()
* line 126 of \lib\classes\scss.php: call to Leafo\ScssPhp\Compiler->compileChild()
* line 1274 of \lib\scssphp\Compiler.php: call to core_scss->compileChild()
* line 295 of \lib\scssphp\Compiler.php: call to Leafo\ScssPhp\Compiler->compileChildrenNoReturn()
* line 194 of \lib\scssphp\Compiler.php: call to Leafo\ScssPhp\Compiler->compileRoot()
* line 98 of \lib\classes\scss.php: call to Leafo\ScssPhp\Compiler->compile()
* line 1216 of \lib\outputlib.php: call to core_scss->to_css()
* line 884 of \lib\outputlib.php: call to theme_config->get_css_content_from_scss()
* line 171 of \theme\styles.php: call to theme_config->get_css_content()
so need to think on how to fix the V3 conversion or just combine the V4 files into one without the script.