Skip to content

Conversation

@qdequippe
Copy link

I recently encountered this issue (see #84) during a deployment to a cloud environment. Since this specific environment restricts the installation of external binaries, I suggest adding a configuration option that allows the bundle to automatically download the appropriate binary during cloud build phase.

@qdequippe qdequippe changed the title feat: Option to search sass executable or not feat: Option to search sass executable Jan 23, 2026
Copy link
Member

@bocharsky-bw bocharsky-bw left a comment

Choose a reason for hiding this comment

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

Hm, I think we don't need that extra arguemnt, how about simplify the business logic in that method?

Comment on lines +187 to +191
$binaryPath = $this->binaryPath;

if (null === $binaryPath && $this->searchBinary) {
$binaryPath = (new ExecutableFinder())->find('sass');
}
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure we need this searchBinary extra parameter? Why we can't just tweak this logic to:

Suggested change
$binaryPath = $this->binaryPath;
if (null === $binaryPath && $this->searchBinary) {
$binaryPath = (new ExecutableFinder())->find('sass');
}
$binaryPath = $this->binaryPath;
if (null === $binaryPath) {
$binaryPath = (new ExecutableFinder())->find('sass');
}

Copy link
Author

Choose a reason for hiding this comment

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

Yes I need it because in my case $this->binaryPath is null so $binaryPath will be null and an executable will be found.

I want to force $binaryPath to be null here, thanks to that SassBinary will download the binary locally.

Copy link
Member

Choose a reason for hiding this comment

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

Hm, that's what I'm talking about... if you have binaryPath set to null, then this code should be enough for you to find the binary:

        $binaryPath = $this->binaryPath;
        if (null === $binaryPath) {
            $binaryPath = (new ExecutableFinder())->find('sass');
        }

Or you don't want the bundle to use your global sass locally and always download the new one?

Copy link
Author

Choose a reason for hiding this comment

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

Or you don't want the bundle to use your global sass locally and always download the new one?

yes that's it! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants