diff --git a/lib/setup-repository.js b/lib/setup-repository.js index 3d0337e..de4e5f0 100644 --- a/lib/setup-repository.js +++ b/lib/setup-repository.js @@ -18,9 +18,10 @@ module.exports = async (path, repoUrl, options = {}) => { if (tryPull) { // Confirm directory is clean - const { stdout: localStatus } = await runProgram("git", ["status", "--porcelain"], { + const { stdoutBuffer } = await runProgram("git", ["status", "--porcelain"], { cwd: path }); + const localStatus = String(stdoutBuffer); if (localStatus) { throw new NpmCrossLinkError( `Cannot proceed with update, repository at ${ path } is not clean:\n${ @@ -37,7 +38,8 @@ module.exports = async (path, repoUrl, options = {}) => { }); } - const { stdoutBuffer: localStatus } = await runProgram("git", ["status"], { cwd: path }); + const { stdoutBuffer } = await runProgram("git", ["status"], { cwd: path }); + const localStatus = String(stdoutBuffer); if ( tryPull &&