Skip to content

Keep Sass compilation working when cache-directory lookup fails - #167

Merged
cpsievert merged 2 commits into
mainfrom
fix/issue-93-cache-context-dir
Nov 18, 2026
Merged

cpsievert merged 2 commits into
mainfrom
fix/issue-93-cache-context-dir

Conversation

@cpsievert

Copy link
Copy Markdown
Contributor

Sass compilation now warns and uses a temporary cache when the default cache directory cannot be determined. Previously, the fallback itself failed with object 'cache_dir' not found, which could prevent a Shiny application from starting.

Initialize the cache path before lookup and include it in the fallback warning only when it is known. Regression tests cover lookup failure, directory creation failure, and compilation using the temporary cache.

Validation: the regression test reproduced the original error before the fix; the full package test suite passes afterward.

Fixes #93.

@cpsievert
cpsievert requested a balanced review from Copilot November 18, 2026 19:40
@cpsievert
cpsievert marked this pull request as ready for review November 18, 2026 19:42

This comment was marked as resolved.

On Windows, dirname() returns forward slashes while normalizePath()
returns backslashes, and the dir.create() warning renders paths in 8.3
short-name form. Normalize both sides of the parent-directory assertions
and make the snapshot transform match any quoted path.
@cpsievert
cpsievert merged commit 1d68eee into main Nov 18, 2026
16 checks passed
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.

Object cache_dir not found

2 participants