Commit 5d78a26
Changed files (2)
src
test
src/core.ts
@@ -371,6 +371,10 @@ export class ProcessPromise extends Promise<ProcessOutput> {
return this
}
+ get cmd() {
+ return this._command
+ }
+
get child() {
return this._zurk?.child
}
test/core.test.js
@@ -295,6 +295,13 @@ describe('core', () => {
assert.ok(o instanceof ProcessOutput)
})
+ test('cmd() returns cmd to exec', () => {
+ const foo = '#bar'
+ const baz = 1
+ const p = $`echo ${foo} --t ${baz}`
+ assert.equal(p.cmd, "echo $'#bar' --t 1")
+ })
+
test('stdio() works', async () => {
let p = $`printf foo`
await p