task: Fix variable substitution for free variables (#10434)

Fixes regression from https://github.com/zed-industries/zed/pull/10341
where it was not possible to use non-zed environmental variables (e.g.
$PATH) in task definitions.

No release note, as this didn't land on Preview yet.
Release Notes:

- N/A
165d6b9edbPiotr Osiewicz committed on 4/11/2024, 7:15:33 PM· committed by GitHubparent0ac3130
3 files changedLine totals unavailable