diff --git a/src/main/js/index.mjs b/src/main/js/index.mjs index 7853335..b72e561 100644 --- a/src/main/js/index.mjs +++ b/src/main/js/index.mjs @@ -30,6 +30,9 @@ $.raw = async (...args) => $.o({quote: v => v})(...args) // https://github.com/google/zx/pull/134 $.silent = async (...args) => quiet($(...args)) +// https://github.com/google/zx/blob/c73ccb468cfd2340fb296e17a543eb2399b449ec/src/core.ts#L174 +$.cwd = process.cwd() + $.o = $.opt = (opts) => (...args) => diff --git a/src/test/js/test.mjs b/src/test/js/test.mjs index 9930ff0..71e00ec 100644 --- a/src/test/js/test.mjs +++ b/src/test/js/test.mjs @@ -144,3 +144,8 @@ import {$, semver, createHook, ip, tempy, tcping, sleep, ctx} from '../../main/j $.verbose = 2 }) } + +// $.cwd +{ + assert.ok($.cwd === process.cwd()) +}