Skip to content
This repository was archived by the owner on Dec 8, 2024. It is now read-only.

Unify MILL_USER_CACHE_DIR #53

Merged
merged 1 commit into from
Sep 26, 2023
Merged

Conversation

Flowdalic
Copy link
Contributor

No description provided.

Copy link
Owner

@lefou lefou left a comment

Choose a reason for hiding this comment

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

Looks good to me. But I now wonder if the ${VAR:-DEFAULT} expression is supported by all shells?

@Flowdalic
Copy link
Contributor Author

But I now wonder if the ${VAR:-DEFAULT} expression is supported by all shells?

It is part of the POSIX sh specification. And most systems have a POSIX (compatible) shell installed and as sh in PATH, and this is mandated for POSIX compliant systems.

"All shells" is a pretty wide target. But all relevant shells and POSIX'ish shells support it. This include bash and zsh. But not, for example, csh, which is a totally different kind of beast (and probably not installed as sh in PATH).

@Flowdalic
Copy link
Contributor Author

Furthermore, shellcheck automatically selects the POSIX-sh dialect if the she-bang is sh. So as long as shellcheck does not complain, your script should be widely portable on all platforms, since POSIX-sh is the least common denominator.

@lefou
Copy link
Owner

lefou commented Sep 26, 2023

Thanks!

@lefou lefou merged commit 282fb19 into lefou:main Sep 26, 2023
@lefou lefou added this to the after 0.4.8 milestone Sep 26, 2023
@Flowdalic Flowdalic deleted the unify-mill-user-cache-dir branch April 1, 2025 13:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants