Closed geelen closed 3 years ago
Now, this works:
await shellac` // Change directory for the duration of the block: in ${__dirname} { $ pwd stdout >> ${(cwd) => expect(cwd).toBe(__dirname)} } // By default we run in process.cwd() $ pwd stdout >> ${(cwd) => expect(cwd).toBe(process.cwd())} // Relative paths work too: $ mkdir -p subdir in ./subdir { $ pwd stdout >> ${(cwd) => expect(cwd).toBe(path.join(process.cwd(), 'subdir'))} $ mkdir -p nesting-ok in "nesting-ok" { $ pwd stdout >> ${(cwd) => expect(cwd).toBe(path.join(process.cwd(), 'subdir', 'nesting-ok'))} } } `
Now, this works: