Patch Changes
-
#583
f640d08- Builtin vars now have proper types:VARLOCK_IS_CIis now aboolean(was a string"true"/"false"), andVARLOCK_BUILD_URLis now aurltype. String builtin vars remain unchanged. -
#581
8337445- Fixvarlock initcrashing on Linux when git is not installed.When
gitis not found in PATH, Node.jsspawnfires anerrorevent with a native ENOENT error that has no.dataproperty. ThecheckIsFileGitIgnoredutility was trying to call.includes()on the undefined.datavalue before reaching the ENOENT check, causing aTypeErrorthat crashed theinitcommand.The fix reorders the error checks to handle the ENOENT case first, and uses optional chaining on the
errorOutputvalue throughout for additional safety. -
#575
349d517- Fix terminal colors when running commands with redaction enabled. Whenvarlock runpipes stdout/stderr for redaction, it now automatically injectsFORCE_COLORinto the child process environment when the parent terminal is a TTY. This preserves color output for tools using color libraries (chalk, kleur, etc.) while keeping redaction active. -
#571
f582766- Support multipleloadPathentries inpackage.jsonconfiguration.The
varlock.loadPathoption inpackage.jsonnow accepts an array of paths in addition to a single string. When an array is provided, all paths are loaded and their environment variables are combined. Later entries in the array take higher precedence when the same variable is defined in multiple locations.{ "varlock": { "loadPath": ["./apps/my-package/envs/", "./apps/other-package/envs/"] } }This is particularly useful in monorepos where different packages each have their own
.envfiles.