dsherret / dax

Cross-platform shell tools for Deno and Node.js inspired by zx.
MIT License
1.02k stars 34 forks source link

feat: error when providing an unexpected object that doesn't override `toString()` in a command expr #231

Closed dsherret closed 8 months ago

dsherret commented 8 months ago

Previously this would just become [object Object].

const obj1 = {};
assertThrows(
  () => $`echo ${obj1}`,
  Error,
  "Failed resolving expression in command. Provided object does not override `toString()`.",
);