diff --git a/lib/phpcbf.js b/lib/phpcbf.js index fe48162..fbc139c 100644 --- a/lib/phpcbf.js +++ b/lib/phpcbf.js @@ -50,8 +50,9 @@ export default { return atom.notifications.addError('Could not find phpcbf executable.', {detail: err.message}); } - let tempFile = tempWrite.sync(editor.getText()); - let args = ['--no-patch', `--standard=${this.standard}`, tempFile]; + let tempFile = atom.workspace.getActiveTextEditor().getPath(); + + let args = [`--standard=${this.standard}`, tempFile]; childProcess.execFile(phpcbf, args, (err, stdOut, stdErr) => { // PHPCBF exits 1 for no apparent reason so we need to check stdErr is not empty. if (err && stdErr.length) {